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 resetall() arguments #214

Merged
merged 4 commits into from
Apr 24, 2021
Merged

Conversation

alex-marty
Copy link
Contributor

Adding standard unittest.reset_mock()'s arguments to MockerFixture.resetall(). It seems like a small fix, please tell me if I'm missing something!

Closes #213

@nicoddemus
Copy link
Member

Thanks a lot for the PR, appreciate it!

The two keyword only arguments were added in Python 3.6 however, so it is breaking the 3.5 builds. I see two options:

  1. Hold off the PR until we drop Python 3.5 support.
  2. Implement the arguments conditionally, making them available only in Python 3.6+.

Which one do you prefer?

I don't see many reasons to keep supporting Python 3.5 given it has reached EOL and pytest 6.2 won't support it anymore either, but it is not something I plan to tackle in the next few weeks.

@alex-marty
Copy link
Contributor Author

Hi! Tanks for the feedback! Indeed I didn't notice the issue with Python 3.5. I usually don't like implementing functionality conditional on runtime versions unless absolutely necessary, so my first impulse would be to wait until support of 3.5 is dropped, especially if it's just around the corner. There are easy workarounds for this functionality in the meantime. What do you think?

@nicoddemus
Copy link
Member

I also prefer to avoid them if possible.

So let's wait then. I will update the title to reflect this, and then I will pick it up once support for 3.5 is dropped. 👍

Thanks again!

@nicoddemus nicoddemus changed the title Add resetall() arguments [Wait drop 3.5] Add resetall() arguments Nov 11, 2020
@nicoddemus nicoddemus changed the title [Wait drop 3.5] Add resetall() arguments Add resetall() arguments Apr 24, 2021
@nicoddemus nicoddemus merged commit c3e9aa1 into pytest-dev:master Apr 24, 2021
@nicoddemus
Copy link
Member

Time to drop Python 3.5. 🎉

@nicoddemus
Copy link
Member

Thanks again for the PR!

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.

Add reset_mock()'s argument's to resetall()
2 participants