From e99f7a25fe60198d874e78befe89a9a49a15d676 Mon Sep 17 00:00:00 2001 From: David Halter Date: Sat, 27 Apr 2013 20:55:51 +0430 Subject: [PATCH] exceptions should produce errors even in alternate run display --- test/run.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/run.py b/test/run.py index d0e9aff0..2736af23 100755 --- a/test/run.py +++ b/test/run.py @@ -344,10 +344,17 @@ if __name__ == '__main__': % (case.line_nr - 1, actual, desired)) return 1 + import traceback current = cases[0].path if cases else None count = fails = 0 for c in cases: - if c.run(report): + try: + if c.run(report): + tests_fail += 1 + fails += 1 + except Exception: + traceback.print_exc() + print("\ttest fail @%d" % (c.line_nr - 1)) tests_fail += 1 fails += 1 count += 1