From: Zachary Ware Date: Sun, 9 Aug 2015 03:01:20 +0000 (-0500) Subject: Issue #24751: Fix running regrtest with '-w' flag in case of test failures. X-Git-Tag: v2.7.11rc1~198^2~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ce698f3aa2e535685d0321709de7fa5d3f6de86f;p=thirdparty%2FPython%2Fcpython.git 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. --- diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index eaf39bb8a674..9a8172cc2033 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -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)