]> granicus.if.org Git - python/commitdiff
Issue #27829: regrtest -W displays stderr if env changed
authorVictor Stinner <victor.stinner@gmail.com>
Fri, 23 Sep 2016 09:13:53 +0000 (11:13 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Fri, 23 Sep 2016 09:13:53 +0000 (11:13 +0200)
regrtest -W hides output if a test pass, but also when env changed and so the
env changed warning is hidden. So it's hard to debug. With this change, stderr
is now always displayed when a test doesn't pass.

Lib/test/regrtest.py

index 8509f55043bbd39d62bc0dbc246859c60db22c2d..f1892acfb48e85cdcaf82b450c6a3f80c7ed1df1 100755 (executable)
@@ -989,7 +989,7 @@ def runtest(test, verbose, quiet,
                 sys.stderr = stream
                 result = runtest_inner(test, verbose, quiet, huntrleaks,
                                        display_failure=False, pgo=pgo)
-                if result[0] == FAILED and not pgo:
+                if result[0] != PASSED and not pgo:
                     output = stream.getvalue()
                     orig_stderr.write(output)
                     orig_stderr.flush()