To help with that this PR makes it so that the pytest entry point is less responsible for those decisions, and that there is more separation between the raw definition and the processed idea of what the test should do.
I've split this PR into many commits to make it easier to see the small changes that happen as I move code around (best seen with the github ignore whitespace option).
The notable changes include
File is now defined in pytest_mypy_plugins.definition, but I've kept a reference to it from pytest_mypy_plugins.collect
When creating the File objects, it dosn't default path to "main.py" because it's mandatory in the schema so it should always have a value anyways
I made the skip logic not call eval if skip is a boolean or the strings "True" or "False"
made test_input_schema.py use SafeLineLoader
Changed the return annotations on the plugin entry point to be less specific as only pytest itself use them and it only cares about the more generic type
I changed how parse_parametrized works, I don't have strong opinions if the previous implementation is preferred.
For https://github.com/typeddjango/pytest-mypy-plugins/issues/144 I think it'll be useful if the yaml definition can be given more control over how the test actually runs it.
To help with that this PR makes it so that the pytest entry point is less responsible for those decisions, and that there is more separation between the raw definition and the processed idea of what the test should do.
I've split this PR into many commits to make it easier to see the small changes that happen as I move code around (best seen with the github ignore whitespace option).
The notable changes include
File
is now defined in pytest_mypy_plugins.definition, but I've kept a reference to it from pytest_mypy_plugins.collectFile
objects, it dosn't default path to "main.py" because it's mandatory in the schema so it should always have a value anyways