Question with type hinting and pytest plugins #13627
Unanswered
Evan0000000000 asked this question in Q&A
Replies: 3 comments
-
| I think PyCharm has their own type-checker thingy written in Java. Most of the ecosystem uses MyPy to verify that typing works. I recommend you to take this to them (JB). |
Beta Was this translation helpful? Give feedback.
0 replies
-
| There's a need for a mypy plugin to expand to pluggy hooks and pytest fixtures |
Beta Was this translation helpful? Give feedback.
0 replies
-
You need to type it for PyCharm to provide auto completion: from pytest_mock import MockerFixture def test(mocker: MockerFixture): ...This is true for any pytest fixture. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi y'all, using Pycharm, pytest, and pytest-mock. While the pytest-mock
mockerfixture works perfectly I can't get autocomplete of available methods and objects to work in my tests.I had the understanding that pytest fixtures should provide typing I'm not sure I'm doing something wrong or if it's a peculiarity of pytest-mock or something else.
Beta Was this translation helpful? Give feedback.
All reactions