Skip to content

Improve test coverage and add more tests #1

@Tejasgaware17

Description

@Tejasgaware17

Description

The python-textutils project currently contains limited test coverage. While basic tests exist for some utilities, several functions and edge cases are not yet covered by automated tests.

Improving test coverage will help ensure correctness, prevent regressions, and make the project more reliable and easier to maintain.

This issue is a good opportunity for contributors to practice writing Python tests using pytest.

Current state

  • Tests exist for only a subset of functionality
  • Some utility functions do not have dedicated tests
  • Edge cases (e.g., empty strings, special characters) are not fully covered

Proposed improvements

  • Add unit tests for all public utility functions
  • Cover edge cases such as:
    • Empty strings
    • Strings with only whitespace
    • Special characters or mixed casing
  • Use pytest best practices (clear test names, parametrization where appropriate)

Acceptance criteria

  • All major utility functions have corresponding tests
  • Tests pass successfully using pytest
  • No existing functionality is broken
  • Code coverage is meaningfully improved (not just line coverage, but behavior)

Getting started (for contributors)

pip install -e .
pytest

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions