From 779a5b0b3aac6a5dcd8473f770e1573a48b51f7d Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Mon, 21 Mar 2011 19:55:16 +0100 Subject: [PATCH] Always print out the traceback when a test "crashed" --- Lib/test/regrtest.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index 440c09c3ae8..238f2760093 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: