From: Antoine Pitrou Date: Mon, 21 Mar 2011 18:55:16 +0000 (+0100) Subject: Always print out the traceback when a test "crashed" X-Git-Tag: v3.2.1b1~236 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=779a5b0b3aac6a5dcd8473f770e1573a48b51f7d;p=python Always print out the traceback when a test "crashed" --- diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index 440c09c3ae..238f276009 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -995,12 +995,9 @@ def runtest_inner(test, verbose, quiet, huntrleaks=False, debug=False): sys.stderr.flush() return FAILED, test_time except: - type, value = sys.exc_info()[:2] - print("test", test, "crashed --", str(type) + ":", value, file=sys.stderr) + msg = traceback.format_exc() + print("test", test, "crashed --", msg, file=sys.stderr) sys.stderr.flush() - if verbose or debug: - traceback.print_exc(file=sys.stderr) - sys.stderr.flush() return FAILED, test_time else: if refleak: