[Python-checkins] cpython (2.7): Issue #24751: Fix running regrtest with '-w' flag in case of test failures.

zach.ware python-checkins at python.org
Sun Aug 9 05:05:45 CEST 2015


https://hg.python.org/cpython/rev/7d69b214e668
changeset:   97333:7d69b214e668
branch:      2.7
user:        Zachary Ware <zachary.ware at gmail.com>
date:        Sat Aug 08 22:01:20 2015 -0500
summary:
  Issue #24751: Fix running regrtest with '-w' flag in case of test failures.

Also fixes reporting of tests that change environment when there are no test
failures.

files:
  Lib/test/regrtest.py |  14 ++++++--------
  1 files changed, 6 insertions(+), 8 deletions(-)


diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -624,14 +624,12 @@
         for time, test in test_times[:10]:
             print "%s: %.1fs" % (test, time)
     if bad:
-        bad = set(bad) - set(environment_changed)
-        if bad:
-            print count(len(bad), "test"), "failed:"
-            printlist(bad)
-        if environment_changed:
-            print "{} altered the execution environment:".format(
-                count(len(environment_changed), "test"))
-            printlist(environment_changed)
+        print count(len(bad), "test"), "failed:"
+        printlist(bad)
+    if environment_changed:
+        print "{} altered the execution environment:".format(
+            count(len(environment_changed), "test"))
+        printlist(environment_changed)
     if skipped and not quiet:
         print count(len(skipped), "test"), "skipped:"
         printlist(skipped)

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


More information about the Python-checkins mailing list