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

Use standard library unittest.mock on Python 3.6 and later #2168

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

musicinmybrain
Copy link

Drop the dependency on PyPI mock beginning with Python 3.6, as it is entirely replaced by unittest.mock in the standard library.

While unittest.mock appeared in Python 3.3, we explicitly check that the Python version is at least 3.6 so that the assert_called() and assert_called_once() methods are available on the Mock class.

@musicinmybrain musicinmybrain changed the title Use standard library unittest.mock on Python 3.6 and later WIP: Use standard library unittest.mock on Python 3.6 and later Jun 3, 2021
@musicinmybrain musicinmybrain changed the title WIP: Use standard library unittest.mock on Python 3.6 and later Use standard library unittest.mock on Python 3.6 and later Jun 4, 2021
@musicinmybrain
Copy link
Author

There are CI failures for reasons that appear unrelated to this 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.

None yet

1 participant