Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pytest-mock test requirement #8712

Merged
merged 1 commit into from
May 21, 2024
Merged

Add pytest-mock test requirement #8712

merged 1 commit into from
May 21, 2024

Conversation

seanh
Copy link
Contributor

@seanh seanh commented May 16, 2024

We already use pytest-mock in some of our other projects.

It can be used alongside h's built-in patch() fixture and direct
unittest.mock usage, though perhaps pytest-mock should be preferred
for new code.

pytest-mock provides a bunch of useful stuff that h doesn't have
otherwise: fancy integration with pytest fixtures, stubs and spies,
better pytest output when assertions involving mocks fail, etc.

@seanh seanh requested a review from marcospri May 16, 2024 17:02
@seanh seanh changed the title Add pytest-mock test requirement Add pytest-mock test requirement May 16, 2024
We already use `pytest-mock` in some of our other projects.

It can be used alongside h's built-in `patch()` fixture and direct
`unittest.mock` usage, though perhaps `pytest-mock` should be preferred
for new code.

`pytest-mock` provides a bunch of useful stuff that h doesn't have
otherwise: fancy integration with pytest fixtures, stubs and spies,
better pytest output when assertions involving mocks fail, etc.
@seanh seanh merged commit 2581451 into main May 21, 2024
9 checks passed
@seanh seanh deleted the add-pytest-mock branch May 21, 2024 11:40
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.

None yet

2 participants