Skip to content

docs: parametrize add_numbers test example to match readability guidance - #798

Merged
willingc merged 1 commit into
pyOpenSci:mainfrom
InessaPawson:test-example
Sep 10, 2026
Merged

docs: parametrize add_numbers test example to match readability guidance#798
willingc merged 1 commit into
pyOpenSci:mainfrom
InessaPawson:test-example

Conversation

@InessaPawson

Copy link
Copy Markdown
Contributor

The "Write tests that are easy to review" section, added in #684, recommends descriptive test names and keeping one behavior in focus per test. The first add_numbers test example on the same page, in the "Test examples" admonition, did the opposite: a generically named test_add_numbers() bundling three cases with three separate assertions, followed by a module-level test_add_numbers() call. This PR updates that example to follow the guidelines introduced in #684.

@willingc willingc left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @InessaPawson. Much clearer.

@willingc
willingc merged commit 9fbe2e3 into pyOpenSci:main Sep 10, 2026
5 checks passed
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.

2 participants