New submission from STINNER Victor <vstin...@python.org>:
When running Python with test -w/--verbose2 command line option to re-run tests which failed, the failing tests are listed in the first summary, and they are not listed in the final summary. Example with Lib/test/test_x.py: --- import builtins import unittest class Tests(unittest.TestCase): def test_succeed(self): return def test_fail_once(self): if not hasattr(builtins, '_test_failed'): builtins._test_failed = True self.fail("bug") --- Current output when running test_sys (success) and test_x (failed once, then pass): --- $ ./python -m test test_sys test_x -w 0:00:00 load avg: 0.80 Run tests sequentially 0:00:00 load avg: 0.80 [1/2] test_sys 0:00:01 load avg: 0.80 [2/2] test_x test test_x failed -- Traceback (most recent call last): File "/home/vstinner/python/main/Lib/test/test_x.py", line 11, in test_fail_once self.fail("bug") ^^^^^^^^^^^^^^^^ AssertionError: bug test_x failed (1 failure) == Tests result: FAILURE == 1 test OK. 1 test failed: test_x 1 re-run test: test_x 0:00:01 load avg: 0.80 0:00:01 load avg: 0.80 Re-running failed tests in verbose mode 0:00:01 load avg: 0.80 Re-running test_x in verbose mode (matching: test_fail_once) test_fail_once (test.test_x.Tests) ... ok ---------------------------------------------------------------------- Ran 1 test in 0.000s OK == Tests result: FAILURE then SUCCESS == All 2 tests OK. Total duration: 2.0 sec Tests result: FAILURE then SUCCESS --- "re-run tests" is missing in the last summary. ---------- components: Tests messages: 401151 nosy: vstinner priority: normal severity: normal status: open title: regrtest no longer lists "re-run tests" in the second summary versions: Python 3.11 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue45118> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com