pytest-mypy-plugins
pytest-mypy-plugins copied to clipboard
pytest plugin for testing mypy types, stubs, and plugins
The latest release of mypy supports configuration in pyproject.toml. However, pytest-mypy-plugins seems to not support it. From a quick glance at the code, it looks like the library generates its...
I've got a test case that looks like this: ``` - case: testAttrsNewStyleClassPy2 mypy_config: python_version = 2.7 main: | import attr @attr.s class Good(object): pass @attr.s class Bad: # E:...
Hi there! Thanks for this plugin, it has been really helpful, sometimes I get issues on CI that I don't get locally, for example: ``` E pytest_mypy_plugins.utils.TypecheckAssertionError: Critical error occurred...
Hi, first of all, thank you for this project! Does `pytest-mypy-plugins` allow to test the local stubs? Supposing the project has the following structure: ``` root/ ├── src/ | ├──...
Sometimes, when we have both `cache` and `xdist`, this might happen: ``` [gw1] linux -- Python 3.8.5 /home/runner/work/returns/returns/.venv/bin/python Traceback (most recent call last): File "/home/runner/work/returns/returns/.venv/lib/python3.8/site-packages/_pytest/runner.py", line 294, in from_call result...
Ref: https://github.com/kornicameister/loguru-mypy/pull/31#discussion_r470841984 --- Idea here is to check if `parametrized` contains a duplicated dictionaries and if so fail fast the test. Problem though is that `pytest` behavior on parameterized is...
Sometimes I want to run all `FutureResult` (or tests for any other type) related tests from `returns`. It is a very complex task right now. I need to: 1. manually...
Here's what I have in mind. What about creating a `@dataclass` or `NamedTuple` or `ish` that will describe using a **model** what is a test case? This should make it...
Currently, when parsing error happens, you will end up with something like this: ``` File "/Users/sobolev/Documents/github/returns/.venv/lib/python3.7/site-packages/pytest_mypy_plugins/utils.py", line 256, in assert_string_arrays_equal lineno = int(first_failure.split(" ")[0].strip(":").split(":")[1]) IndexError: list index out of range...
I have a popular case when I use docstrings to illustrate my examples right in the docs. But, the problem is that cannot be checked. I use regular `--doctest-modules` feature...