mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
#7110: have regrtest print test failures and tracebacks to stderr not stdout.
Patch by Sandro Tosi.
This commit is contained in:
parent
c663b58c9a
commit
11cabcf73d
3 changed files with 10 additions and 6 deletions
|
@ -957,16 +957,16 @@ def runtest_inner(test, verbose, quiet,
|
|||
except KeyboardInterrupt:
|
||||
raise
|
||||
except support.TestFailed as msg:
|
||||
print("test", test, "failed --", msg)
|
||||
sys.stdout.flush()
|
||||
print("test", test, "failed --", msg, file=sys.stderr)
|
||||
sys.stderr.flush()
|
||||
return FAILED, test_time
|
||||
except:
|
||||
type, value = sys.exc_info()[:2]
|
||||
print("test", test, "crashed --", str(type) + ":", value)
|
||||
sys.stdout.flush()
|
||||
print("test", test, "crashed --", str(type) + ":", value, file=sys.stderr)
|
||||
sys.stderr.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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue