pytest-mypy-testing
pytest-mypy-testing copied to clipboard
pytest plugin to test mypy static type analysis
Seeing the following error in my CI tests: ``` File "/tmp/.tox/py310-macos/lib/python3.10/site-packages/pytest_mypy_testing/plugin.py", line 12, in from py._path.local import LocalPath ModuleNotFoundError: No module named 'py._path'; 'py' is not a package ``` looks...
This allows the colon (:) in the drive specifier on Windows to be included into the fname match. Fixes #17
Ran into a problem with running this on windows. Im not entirely sure whats special about my setup that would cause this. Relevant line from attached error message ```python line...
While a clearing the cache between tests can be good for reproducibility, it can also slow down iterative development. Any thoughts on how we can balance that?
In certain cases, we have a mypy assertion like: ```python @pytest.mark.mypy_testing def test_foo(): link = Link() link1.url = 123 # E: Incompatible types in assignment (expression has type "int", variable...
It seems that pytest.mark.skip only works on specific mypy tests. * It's not possible to use pytestmark at the module level. * It's not possible to use pytest.skip(allow_module_level=True) either This...
Allowing custom mypy configuration (on plugin level or perhaps on fixture level) would allow e.g. specifying a mypy plugin to load.
This would allow `pytest --pdb` to magically break into mypy, which is very helpful when developing mypy plugins. Basically copy https://github.com/pynamodb/PynamoDB/blob/fe97c856201770322eeb94858a61ff3993cd439b/tests/mypy_helpers.py#L33-L34 and https://github.com/pynamodb/PynamoDB/blob/fe97c856201770322eeb94858a61ff3993cd439b/tests/conftest.py#L10
Proposed fix for #44 Adds a new severity symbol "O" (i.e. call-Overload). This new severity acts as "E" but activates suppression of note messages on the same line. Documentation and...
For a "[call-overload]" error mypy raises an `error` and multiple `note` messages. Since we can't test for multiple messages on the same line its currently not possible to successfully test...