From: Victor Stinner Date: Fri, 23 Sep 2016 09:13:53 +0000 (+0200) Subject: Issue #27829: regrtest -W displays stderr if env changed X-Git-Tag: v3.6.0b2~135^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bd2ffa502212bedfdeeda1a05b3a23246e085495;p=python Issue #27829: regrtest -W displays stderr if env changed 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. --- diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index 8509f55043..f1892acfb4 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -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()