[Python-checkins] cpython (3.5): Issue #27829: regrtest -W displays stderr if env changed

victor.stinner python-checkins at python.org
Fri Sep 23 05:18:26 EDT 2016


https://hg.python.org/cpython/rev/cbe049647a04
changeset:   104026:cbe049647a04
branch:      3.5
parent:      104021:45ba976b7064
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Fri Sep 23 11:13:53 2016 +0200
summary:
  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.

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


diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -989,7 +989,7 @@
                 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()

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


More information about the Python-checkins mailing list