Question with type hinting and pytest plugins #13627
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.
-
There's a need for a mypy plugin to expand to pluggy hooks and pytest fixtures |
Beta Was this translation helpful? Give feedback.
-
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.
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
mocker
fixture 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