diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-05-02 09:37:08 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-05-02 09:37:08 (GMT) |
commit | 0d80a5874ae2177b4352f997f962062d81734d4c (patch) | |
tree | a2577f1bf978f9ec85353fcd461c11d85f385435 /Lib/test/regrtest.py | |
parent | 70d8a86ea0f98919efbb39d852a6696811682ce4 (diff) | |
download | cpython-0d80a5874ae2177b4352f997f962062d81734d4c.zip cpython-0d80a5874ae2177b4352f997f962062d81734d4c.tar.gz cpython-0d80a5874ae2177b4352f997f962062d81734d4c.tar.bz2 |
Issue #8533: Write tracebacks and failed tests to sys.stderr instead of
sys.stdout to avoid UnicodeEncodeError (use backslashreplace error handler)
Diffstat (limited to 'Lib/test/regrtest.py')
-rwxr-xr-x | Lib/test/regrtest.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index c432ca4..ec49b95 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -939,8 +939,8 @@ def runtest_inner(test, verbose, quiet, print("test", test, "crashed --", str(type) + ":", value) sys.stdout.flush() if verbose or debug: - traceback.print_exc(file=sys.stdout) - sys.stdout.flush() + traceback.print_exc(file=sys.stderr) + sys.stderr.flush() return FAILED, test_time else: if refleak: |