Skip to content

test: add whitespace edge cases - #45

Merged
michalmaj merged 1 commit into
mainfrom
test/add-whitespace-cases
Sep 26, 2026
Merged

michalmaj merged 1 commit into
mainfrom
test/add-whitespace-cases

Conversation

@michalmaj

Copy link
Copy Markdown
Owner

Summary

Expand the example test suite with whitespace edge cases and use the change to teach focused pytest parametrization.

Why

The text utilities already handle whitespace-only and leading or trailing whitespace, but the test suite did not document those behaviors. The existing repeated tests also provide a small, practical example of when parametrization improves readability.

Changes

  • parametrize related normalization and word-counting inputs
  • add whitespace-only and leading or trailing whitespace cases
  • explain pytest parametrization and when separate tests are clearer
  • record the completed testing milestone in the roadmap

Type of change

Select the most relevant option.

  • Documentation
  • Project configuration
  • New feature
  • Tests
  • CI/CD
  • Refactoring
  • Bug fix

Checklist

  • The change is small and focused
  • The pull request title is clear
  • I updated documentation if needed
  • I added or updated tests if needed
  • I ran local checks if applicable

Notes

The suite now collects 12 tests instead of 8. No package behavior changed.

Local checks passed:

  • uv run ruff check .
  • uv run ruff format --check .
  • uv run pytest
  • uv build --no-sources
  • git diff --check

@michalmaj
michalmaj merged commit 907033a into main Sep 26, 2026
1 check passed
@michalmaj
michalmaj deleted the test/add-whitespace-cases branch September 26, 2026 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant