New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mypy plugin for @mark.parametrize
#9334
Labels
type: proposal
proposal for a new feature, often to gather opinions or design the API around the new feature
Comments
Jasha10
changed the title
mypy plugin for @mark.parametrizev
mypy plugin for @mark.parametrize
Nov 23, 2021
Jasha10
changed the title
mypy plugin for @mark.parametrize
mypy plugin for Nov 23, 2021
@mark.parametrize
That seems like a good idea - but I don't think it should be part of pytest core. |
Zac-HD
added
the
type: proposal
proposal for a new feature, often to gather opinions or design the API around the new feature
label
Nov 24, 2021
Nice idea. I found that there is typeguard project which can be used to perform run-time type checks. # conftest.py
import typeguard
def pytest_collection_modifyitems(session, config, items):
for item in items:
item.obj = typeguard.typechecked(item.obj)
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
type: proposal
proposal for a new feature, often to gather opinions or design the API around the new feature
The idea is that a plugin would allow the arguments to the
@pytest.mark.parametrize
decorator to be type-checked.For example:
The text was updated successfully, but these errors were encountered: