Print test exception right away, in case the full test run crashes

This commit is contained in:
Lorenzo Bolla
2021-02-03 14:29:21 +01:00
parent 3201244d9b
commit 993dd2ad1c

View File

@@ -86,6 +86,7 @@ def run(include_long_tests=False, capture_results=False, tests=None, filters=Non
numFailed += 1
typ, val, tb = sys.exc_info()
fails.append((test, t, typ, val, tb, testModule))
traceback.print_exception(typ, val, tb)
sys.stdout.write(colored("FAIL\n", color="red"))
else:
sys.stdout.write(colored("OK\n", color="green"))