pytest-mypy icon indicating copy to clipboard operation
pytest-mypy copied to clipboard

Mypy static type checker plugin for Pytest

Results 15 pytest-mypy issues
Sort by recently updated
recently updated
newest added

The [jaraco.site project](/jaraco/jaraco.site) has a file in the tree that's [ignored for tests](https://github.com/jaraco/jaraco.site/blob/988dffe06aa2da21768093a4482df9d3bfeade0d/conftest.py#L3). However, even with that configuration, the file gets collected and is run by mypy and causes tests...

integration

When running tests with pytest-mypy enabled and PYTHONWARNDEFAULTENCODING=1, I see these warnings: ``` docs/conf.py::mypy docs/conf.py::mypy /Users/jaraco/code/jaraco/pytest-enabler/.tox/python/lib/python3.11/site-packages/pytest_mypy.py:272: EncodingWarning: 'encoding' argument not specified stdout, stderr, status = mypy.api.run( docs/conf.py::mypy /Users/jaraco/code/jaraco/pytest-enabler/.tox/python/lib/python3.11/site-packages/pytest_mypy.py:312: EncodingWarning: 'encoding'...

The `test_looponfail` test fails: ``` =========================== short test summary info ============================ FAILED tests/test_pytest_mypy.py::test_looponfail[test_demo] - pexpect.except... FAILED tests/test_pytest_mypy.py::test_looponfail[__init__] - pexpect.excepti... ============= 2 failed, 48 passed, 6 xfailed in 534.07s (0:08:54) ==============...

After upgrading to v0.10.2 my CI system started failing, giving the following error: ``` Traceback (most recent call last): File "/home/alex/code/FINESSE/.venv/bin/pytest", line 5, in from pytest import console_main File "/home/alex/code/FINESSE/.venv/lib/python3.9/site-packages/pytest/__init__.py",...

Right now I have `--mypy` in my `pytest.ini` file so that `mypy` runs by default when my tests are run, both locally and in CI However, when I'm quickly iterating...

integration

Relates to #120 : adds further information to the error message so that the mentioned issue can be more easily debugged (e.g. on CI environments)

I have some type errors in my code, and would like to find them by running mypy via pytest-mypy. When I run pytest, I get: ``` =========================================================================== test session starts...

bug
integration

I'm working on a module specifically for use with typing, so I have tests that I expect to raise mypy warnings. It doesn't look like there's a way to mark...

It seems that the failures for pylint have ``[pylint]`` prepended to the filename in the failure output: ![image](https://user-images.githubusercontent.com/5601876/90517758-1f85d600-e166-11ea-8aff-a1d61d12dda7.png) It would be great to have ``[mypy]`` prepended to the filenames of...

Here's what I came up with while trying to replicate mypy's own testcases, which interleave the expected errors in the source code like so: https://github.com/ikonst/pynamodb-mypy/blob/9453404f576c4ead04749d61eb041e10bec13229/tests/test_plugin.py The implementation is here: https://github.com/ikonst/pynamodb-mypy/blob/9453404f576c4ead04749d61eb041e10bec13229/tests/mypy_helpers.py...

reporting