-
-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Enhance doctest support in regrtest --list-cases #74868
Comments
bpo-30523 added a new --list-cases command to regrtest to list test methods. It is able to list doctest tests in test_builtins, but not in test_extcall. test_builtin doctest tests: haypo@selma$ ./python -m test test_builtin --list-cases|grep ^builtins test_builtins works because it uses: def load_tests(loader, tests, pattern):
from doctest import DocTestSuite
tests.addTest(DocTestSuite(builtins))
return tests Listing test methods of test_extcall doesn't work, the following command has no output (but succeed): ./python -m test test_extcall --list-cases test_extcall uses: def test_main():
support.run_doctest(sys.modules[__name__], True) I see two options:
|
Note that --match (and --matchfile) is ignored by doctests. I think this can cause a problem for bisect feature. After making --match working with doctests we can found a way to name doctests and list them. |
In test_os, --match works on doctest tests: haypo@selma$ ./python -m test -v test_builtin --match=builtins.hex ---------------------------------------------------------------------- |
I have no idea how to implement this idea. I'm not interested to work on this topic, so I just close this issue. If someone wants to work on this topic, please open a new issue. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: