summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/unittest.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/unittest.py b/Lib/unittest.py
index 7de4d6c..3f59916 100644
--- a/Lib/unittest.py
+++ b/Lib/unittest.py
@@ -202,6 +202,8 @@ class TestCase:
try:
try:
self.setUp()
+ except KeyboardInterrupt:
+ raise
except:
result.addError(self, self.__exc_info())
return
@@ -212,11 +214,15 @@ class TestCase:
ok = 1
except self.failureException, e:
result.addFailure(self, self.__exc_info())
+ except KeyboardInterrupt:
+ raise
except:
result.addError(self, self.__exc_info())
try:
self.tearDown()
+ except KeyboardInterrupt:
+ raise
except:
result.addError(self, self.__exc_info())
ok = 0