Skip to content

Add pytest_mock stubs - #4275

Merged
JelleZijlstra merged 6 commits into
python:masterfrom
srittau:pytest-mock
Jun 28, 2020
Merged

JelleZijlstra merged 6 commits into
python:masterfrom
srittau:pytest-mock

Conversation

@srittau

@srittau srittau commented Jun 26, 2020

Copy link
Copy Markdown
Collaborator

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

srittau commented Jun 26, 2020

Copy link
Copy Markdown
Collaborator Author

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

srittau commented Jun 26, 2020 •

Copy link
Copy Markdown
Collaborator Author

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

@srittau

srittau commented Jun 26, 2020

Copy link
Copy Markdown
Collaborator Author

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

@JelleZijlstra

Copy link
Copy Markdown
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