Backlog
Description
Bug description:
Since GH-151689 (gh-109817), python -m test --list-cases prints the bare name of a test module that fails to import among the test case ids. The option is documented to "only write the name of test cases that will be run", and Lib/test/bisect_cmd.py treats every line it prints as a test id. 3.15 left such a module out.
$ mkdir tests
$ printf 'import does_not_exist\n' > tests/test_broken.py
$ printf 'import unittest\nclass T(unittest.TestCase):\n def test_a(self): pass\n' > tests/test_ok.py
$ python -m test --testdir tests --list-cases test_broken test_ok
test_broken
test_ok.T.test_a
3.15.0 prints:
test_ok.T.test_a
Expected: the 3.15 output.
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Activity