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

prefer the new unittest.mock from the standard library #297

Merged
merged 1 commit into from
Jun 11, 2024

Conversation

a-detiste
Copy link

https://github.com/testing-cabal/mock

mock is now part of the Python standard library, available as unittest.mock in Python 3.3 onwards.

try:
from unittest import mock
except ImportError:
import mock
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't support the ancient versions of Python, so I think this precaution is unnecessary (unless I'm missing something).

@a-detiste
Copy link
Author

a-detiste commented Jun 10, 2024 via email

@kedder
Copy link
Owner

kedder commented Jun 10, 2024

It is somewhat documented in pyproject.toml:

requires-python = ">=3.9"

I think we can assume it is not running on earlier pythons (and it probably won't for a lot of other reasons)

@a-detiste
Copy link
Author

a-detiste commented Jun 10, 2024 via email

@kedder kedder merged commit df1dd2a into kedder:master Jun 11, 2024
5 checks passed
@kedder
Copy link
Owner

kedder commented Jun 11, 2024

Thank you!

@coveralls
Copy link

Coverage Status

coverage: 96.05%. remained the same
when pulling 01bc897 on a-detiste:master
into 2250754 on kedder:master.

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

3 participants