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 reset_mock()'s argument's to resetall() #213

Closed
alex-marty opened this issue Nov 10, 2020 · 0 comments · Fixed by #214
Closed

Add reset_mock()'s argument's to resetall() #213

alex-marty opened this issue Nov 10, 2020 · 0 comments · Fixed by #214

Comments

@alex-marty
Copy link
Contributor

unittest's Mock.reset_mock() method has two keyword-only arguments return_value and side_effect, allowing to reset these attributes on mocks if desired (unittest doc). However pytest-mock's mocker.resetall() doesn't have these arguments, requiring to reset mocks individually and breaking resetall()'s usefulness in that case.

The return_value and side_effect keyword-only arguments could be added to resetall() and passed to reset_mock() calls, mimicking its signature and behavior.

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 a pull request may close this issue.

1 participant