Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bd2ffa5

Browse files
committed
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.
1 parent fb4a96a commit bd2ffa5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/test/regrtest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -989,7 +989,7 @@ def runtest(test, verbose, quiet,
989989
sys.stderr = stream
990990
result = runtest_inner(test, verbose, quiet, huntrleaks,
991991
display_failure=False, pgo=pgo)
992-
if result[0] == FAILED and not pgo:
992+
if result[0] != PASSED and not pgo:
993993
output = stream.getvalue()
994994
orig_stderr.write(output)
995995
orig_stderr.flush()

0 commit comments

Comments
 (0)