Closed as not planned
Description
Imagine I have some code like this:
import pytest
@pytest.mark.parametrize(
"arg",
[
pytest.param("1", id="good"),
pytest.param(2, id="bad"),
],
)
def test_arg(arg: str) -> None:
assert arg
Currently with Python 3.11, mypy==1.16.0
and pytest-mypy==1.0.1
won't flag that the second pytest.param
actually has a type mismatch (int
vs str
).
It would be super useful to flag this as a latent TypeError
when using pytest --mypy
.
Metadata
Metadata
Assignees
Labels
No labels