[New-bugs-announce] [issue45118] regrtest no longer lists "re-run tests" in the second summary
STINNER Victor
report at bugs.python.org
Mon Sep 6 12:28:52 EDT 2021
New submission from STINNER Victor <vstinner at 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 <report at bugs.python.org>
<https://bugs.python.org/issue45118>
_______________________________________
More information about the New-bugs-announce
mailing list