]> granicus.if.org Git - python/commitdiff
Issue #24751: Fix running regrtest with '-w' flag in case of test failures.
authorZachary Ware <zachary.ware@gmail.com>
Sun, 9 Aug 2015 03:01:20 +0000 (22:01 -0500)
committerZachary Ware <zachary.ware@gmail.com>
Sun, 9 Aug 2015 03:01:20 +0000 (22:01 -0500)
Also fixes reporting of tests that change environment when there are no test
failures.

Lib/test/regrtest.py

index eaf39bb8a674565dbb9596ae1534390f8dbee437..9a8172cc20337b2072ab8fdf87fbade8e5d2c5b2 100755 (executable)
@@ -624,14 +624,12 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
         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)