Problem
As a first-time contributor, I found it difficult to determine the
expected workflow for adding and verifying tests.
While working on #429, I had to figure out:
- how to find the appropriate test file
- how to follow the repository's existing pytest conventions
- how to run focused tests
- how to run the full test suite
- how to verify that a regression test actually fails when the
protected behavior is broken
The current contributor documentation does not explain this workflow
for someone making their first test contribution.
Proposed change
Add a short contributor-testing section explaining how to:
- Find the relevant existing test file.
- Follow the repository's existing test patterns.
- Add parameterized test cases where appropriate.
- Run the relevant tests locally.
- Intentionally verify that the test catches a regression.
- Run the full test suite before opening a PR.
The section would use a small example based on the existing test suite.
Motivation
I encountered this while working on #429, where I added parameterized
tests for two-sided humanize.clamp() boundary behavior.
I also intentionally introduced a regression to verify that the new
test failed, then restored the implementation and ran the full suite.
Related PR: #429
Problem
As a first-time contributor, I found it difficult to determine the
expected workflow for adding and verifying tests.
While working on #429, I had to figure out:
protected behavior is broken
The current contributor documentation does not explain this workflow
for someone making their first test contribution.
Proposed change
Add a short contributor-testing section explaining how to:
The section would use a small example based on the existing test suite.
Motivation
I encountered this while working on #429, where I added parameterized
tests for two-sided
humanize.clamp()boundary behavior.I also intentionally introduced a regression to verify that the new
test failed, then restored the implementation and ran the full suite.
Related PR: #429