Issue #8533: Write tracebacks and failed tests to sys.stderr instead of

sys.stdout to avoid UnicodeEncodeError (use backslashreplace error handler)
This commit is contained in:
Victor Stinner 2010-05-02 09:37:08 +00:00
parent 70d8a86ea0
commit 0d80a5874a
3 changed files with 6 additions and 3 deletions

View file

@ -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: