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 pytest_mock stubs #4275

Merged
merged 6 commits into from
Jun 28, 2020
Merged

Add pytest_mock stubs #4275

merged 6 commits into from
Jun 28, 2020

Conversation

srittau
Copy link
Collaborator

@srittau srittau commented Jun 26, 2020

These can certainly be improved in the future, especially since unittest.mock can be improved as well.

See pytest-dev/pytest-mock#152 for a discussion on adding stubs to pytest-mock directly: It will most likely happen when they drop support for Python 2.

@srittau
Copy link
Collaborator Author

srittau commented Jun 26, 2020

Another note: While pytest-mock supports Python 2, the stubs do not, since this would have complicated them significantly, due to unittest.mock being Python-3-only.

@srittau
Copy link
Collaborator Author

srittau commented Jun 26, 2020

It seems that pytype gets stuck at some point, also when testing locally. I will investigate.

@srittau
Copy link
Collaborator Author

srittau commented Jun 26, 2020

Contains two workarounds for google/pytype#611 and google/pytype#612.

@JelleZijlstra
Copy link
Member

Thanks for adding this and working through these pytype quirks.

@srittau srittau deleted the pytest-mock branch June 28, 2020 10:14
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.

2 participants