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

unmock all test doubles after each test #235

Merged
merged 24 commits into from
May 21, 2024
Merged

unmock all test doubles after each test #235

merged 24 commits into from
May 21, 2024

Conversation

Chemaclass
Copy link
Member

@Chemaclass Chemaclass commented Dec 10, 2023

πŸ“š Description

Currently, you can mock a particular function with custom logic, but there is no way to rollback the mock for other tests.
The goal is to be able to rollback the mocked behaviour to the original one - and this should happen automatically after each test case.

πŸ”– Changes

  • Add unmock
  • Call clear_mocks after run_tear_down for each test

βœ… To-do list

  • I updated the CHANGELOG.md to reflect the new feature or fix
  • I updated the documentation to reflect the changes

@Chemaclass Chemaclass added the enhancement New feature or request label Dec 10, 2023
@Chemaclass Chemaclass self-assigned this Dec 10, 2023
@Chemaclass Chemaclass marked this pull request as draft January 16, 2024 17:05
@Chemaclass Chemaclass marked this pull request as ready for review May 20, 2024 11:12
docs/test-doubles.md Outdated Show resolved Hide resolved
@Chemaclass Chemaclass merged commit 7d05411 into main May 21, 2024
7 checks passed
@Chemaclass Chemaclass deleted the feat/unmock-2 branch May 21, 2024 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants