[Python-checkins] cpython (merge 3.5 -> default): Closes #24751: Merge with 3.5

zach.ware python-checkins at python.org
Wed Aug 5 05:00:19 CEST 2015


https://hg.python.org/cpython/rev/6f67c74608b6
changeset:   97260:6f67c74608b6
parent:      97255:7c68d5d30441
parent:      97259:9d1f6022261d
user:        Zachary Ware <zachary.ware at gmail.com>
date:        Tue Aug 04 21:59:09 2015 -0500
summary:
  Closes #24751: Merge with 3.5

files:
  Lib/test/regrtest.py |  9 ++++++++-
  Misc/NEWS            |  7 +++++++
  2 files changed, 15 insertions(+), 1 deletions(-)


diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -810,7 +810,7 @@
 
     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 @@
                 # 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:
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -71,6 +71,13 @@
 - Issue #24729: Correct IO tutorial to match implementation regarding
   encoding parameter to open function.
 
+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.
+
 
 What's New in Python 3.5.0 beta 4?
 ==================================

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list