Index: expect_tests/unittest_helper.py |
diff --git a/expect_tests/unittest_helper.py b/expect_tests/unittest_helper.py |
index 8c6eb4782ded0e20836fc3a3d0a7d75f843c75f2..e8b5270c50bb2ae736632d8112669f22ec01fcaa 100644 |
--- a/expect_tests/unittest_helper.py |
+++ b/expect_tests/unittest_helper.py |
@@ -26,8 +26,14 @@ def _RunTestCaseSingle(test_case, test_name, test_instance=None): |
# class... |
test_instance = test_instance or test_case('__init__') |
test_instance.setUp() |
+ test_instance._test_failed_with_exception = False |
try: |
return Result(getattr(test_instance, test_name)()) |
+ except KeyboardInterrupt: |
+ raise |
+ except: |
+ test_instance._test_failed_with_exception = True |
+ raise |
finally: |
test_instance.tearDown() |