Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions runtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,7 @@ def run_cmd(name: str) -> int:
if name in cmds:
cmd = cmds[name]
else:
if name.endswith(".test"):
cmd = ["pytest", f"mypy/test/testcheck.py::TypeCheckSuite::{name}"]
else:
cmd = ["pytest", "-n0", "-k", name]
cmd = ["pytest", "-n0", "-k", name]
print(f"run {name}: {cmd}")
proc = subprocess.run(cmd, stderr=subprocess.STDOUT)
if proc.returncode:
Expand Down Expand Up @@ -161,7 +158,7 @@ def main() -> None:
"Run the given tests. If given no arguments, run everything except"
+ " pytest-extra and mypyc-extra. Unrecognized arguments will be"
+ " interpreted as individual test names / substring expressions"
+ " (or, if they end in .test, individual test files)"
+ " (which can end in .test, to specify individual test files)"
+ " and this script will try to run them."
Comment on lines 160 to 162
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be easier to just say it's passed onto pytest?

Copy link
Contributor Author

@wyattscarpenter wyattscarpenter Dec 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be easier, but I wouldn't regard it as explanatory enough. I'd like to briefly explain to the user of runtests.py the important info for them to know, like this; instead of just, say, pointing them to https://docs.pytest.org/en/stable/how-to/usage.html#select-tests (which is correct information about what happens).

Figuring out this specific implication is a service we can provide to the reader.

)
if "-h" in args or "--help" in args:
Expand Down