From e5f7ed87d4473edde8c28a073fdd670ceb020e30 Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Sun, 3 Feb 2008 01:24:22 +0000 Subject: [PATCH] Fixed #6478 -- Allow tests to be interrupted with system exits and ^C. Thanks, Bastian Kleineidam. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7056 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/test/testcases.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/django/test/testcases.py b/django/test/testcases.py index f524f1c34d1..5589443aedf 100644 --- a/django/test/testcases.py +++ b/django/test/testcases.py @@ -72,6 +72,8 @@ class TestCase(unittest.TestCase): self.client = Client() try: self._pre_setup() + except (KeyboardInterrupt, SystemExit): + raise except Exception: import sys result.addError(self, sys.exc_info())