summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZachary Ware <zachary.ware@gmail.com>2015-08-05 02:54:54 (GMT)
committerZachary Ware <zachary.ware@gmail.com>2015-08-05 02:54:54 (GMT)
commit920a335e97977114f870050cddf5647d24612852 (patch)
treeeb4ef924c3e8fb249c26414b41a5d31fd1e08980
parent1ae28d2ff35caaa53aac34a064977c6c3997819f (diff)
downloadcpython-920a335e97977114f870050cddf5647d24612852.zip
cpython-920a335e97977114f870050cddf5647d24612852.tar.gz
cpython-920a335e97977114f870050cddf5647d24612852.tar.bz2
Issue #24751: When running regrtest with '-w', don't fail if re-run succeeds.
-rwxr-xr-xLib/test/regrtest.py11
-rw-r--r--Misc/NEWS4
2 files changed, 12 insertions, 3 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index 350e684..c97ec52 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:
diff --git a/Misc/NEWS b/Misc/NEWS
index e6a5399..76ad970 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -380,6 +380,10 @@ IDLE
Tests
-----
+- Issue #24751: When running regrtest with the ``-w`` command line option,
+ a test run is no longer marked as a failure if all tests succeed when
+ re-run.
+
- Issue #21520: test_zipfile no longer fails if the word 'bad' appears
anywhere in the name of the current directory.