diff options
Diffstat (limited to 'Lib/test/regrtest.py')
-rwxr-xr-x | Lib/test/regrtest.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index 5b1fcc6..5650be0 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -810,7 +810,7 @@ def main(tests=None, **kwargs): if ns.verbose2 and bad: print("Re-running failed tests in verbose mode") - for test in bad: + for test in bad[:]: print("Re-running test %r in verbose mode" % test) sys.stdout.flush() try: @@ -821,6 +821,13 @@ def main(tests=None, **kwargs): # print a newline separate from the ^C print() break + else: + if ok[0] in {PASSED, ENV_CHANGED, SKIPPED, RESOURCE_DENIED}: + bad.remove(test) + else: + if bad: + print(count(len(bad), 'test'), "failed again:") + printlist(bad) if ns.single: if next_single_test: |