-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
meta tests: refactor run_pytest #15481
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
meta tests: refactor run_pytest #15481
Conversation
efaa570 to
632c88b
Compare
632c88b to
b481b33
Compare
c08848a to
f00a623
Compare
hauntsaninja
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, one nit!
mypy/test/meta/_pytest.py
Outdated
|
|
||
| test_nodeid = f"{pytest_node_prefix}::{p.name}" | ||
| extra_args = [sys.executable, "-m", "pytest", "-n", "0", "-s", *extra_args, test_nodeid] | ||
| if sys.version_info >= (3, 8): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've dropped support for 3.7 :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
b0083b0 but we should maybe enable https://beta.ruff.rs/docs/rules/outdated-version-block/ and perhaps more "pyupgrade" rules? (in a separate PR)
For example, this [review comment](#15481 (comment)) could've been spared with [UP036](https://beta.ruff.rs/docs/rules/outdated-version-block/).
Factor
run_pytestout of mypy/test/meta/test_*.py.Also, prefixing the nested pytest output so it's harder to mix it up with parent pytest's: