You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
regrtest --single-process-per-case selects the wrong tests for some case ids #163034
python -m test --single-process-per-case (GH-151689, gh-109817) selects each case in its worker by passing the case id as a -m pattern. A case id containing brackets, such as the ZoneInfoTest[<zone>] cases of test_datetime, is read as an fnmatch character class, so its worker runs no test and the run still reports SUCCESS. A case id without a dot, such as the module doctest statistics in test_statistics, matches every id with that component, so its worker also runs the other doctests of that module.
$ python -m test --testdir tests --single-process-per-case test_ids
Using random seed: 3110927847
0:00:00 load avg: 1.09 mem: 25.3 MiB Run 5 tests in parallel using 1 worker process
0:00:00 load avg: 1.09 mem: 27.3 MiB [1/5] test_ids.Tests[x].test_one ran no tests
0:00:00 load avg: 1.09 mem: 27.4 MiB [2/5] test_ids.Tests.test_one passed
0:00:00 load avg: 1.09 mem: 27.5 MiB [3/5] example passed
0:00:00 load avg: 1.09 mem: 27.1 MiB [4/5] example.a passed
0:00:01 load avg: 1.09 mem: 25.7 MiB [5/5] example.b passed
== Tests result: SUCCESS ==
1 test run no tests:
test_ids.Tests[x].test_one
All 4 tests OK.
Total duration: 1.1 sec
Total tests: run=6
Total test files: run=5/5 run_no_tests=1
Result: SUCCESS
Expected: each of the 5 cases runs once in its own process, as the option promises ("run each test case in its own process"), so All 5 tests OK. and run=5.
Activity