mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
bpo-33718: regrtest: use "xxx then yyy" result if re-run (GH-7521)
If tests are re-run, use "xxx then yyy" result format (ex: "FAILURE then SUCCESS") to show that some failing tests have been re-run. Add also test_regrtest.test_rerun_fail() test.
This commit is contained in:
parent
396ecb9c3e
commit
c45fc7673e
2 changed files with 44 additions and 7 deletions
|
@ -79,6 +79,7 @@ class Regrtest:
|
|||
self.resource_denieds = []
|
||||
self.environment_changed = []
|
||||
self.rerun = []
|
||||
self.first_result = None
|
||||
self.interrupted = False
|
||||
|
||||
# used by --slow
|
||||
|
@ -273,6 +274,8 @@ class Regrtest:
|
|||
self.ns.failfast = False
|
||||
self.ns.verbose3 = False
|
||||
|
||||
self.first_result = self.get_tests_result()
|
||||
|
||||
print()
|
||||
print("Re-running failed tests in verbose mode")
|
||||
self.rerun = self.bad[:]
|
||||
|
@ -447,7 +450,10 @@ class Regrtest:
|
|||
if not result:
|
||||
result.append("SUCCESS")
|
||||
|
||||
return ', '.join(result)
|
||||
result = ', '.join(result)
|
||||
if self.first_result:
|
||||
result = '%s then %s' % (self.first_result, result)
|
||||
return result
|
||||
|
||||
def run_tests(self):
|
||||
# For a partial run, we do not need to clutter the output.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue