diff options
| author | Zachary Ware <zachary.ware@gmail.com> | 2015-08-04 21:54:54 -0500 |
|---|---|---|
| committer | Zachary Ware <zachary.ware@gmail.com> | 2015-08-04 21:54:54 -0500 |
| commit | 920a335e97977114f870050cddf5647d24612852 (patch) | |
| tree | eb4ef924c3e8fb249c26414b41a5d31fd1e08980 /Lib | |
| parent | 1ae28d2ff35caaa53aac34a064977c6c3997819f (diff) | |
| download | cpython-git-920a335e97977114f870050cddf5647d24612852.tar.gz | |
Issue #24751: When running regrtest with '-w', don't fail if re-run succeeds.
Diffstat (limited to 'Lib')
| -rwxr-xr-x | Lib/test/regrtest.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index 350e6849ee..c97ec52c7a 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -812,7 +812,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: @@ -823,8 +823,13 @@ def main(tests=None, **kwargs): # print a newline separate from the ^C print() break - except: - raise + 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: |
