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
This commit is contained in:
Malcolm Tredinnick 2008-02-03 01:24:22 +00:00
parent e715ead55f
commit e5f7ed87d4
1 changed files with 2 additions and 0 deletions

View File

@ -72,6 +72,8 @@ class TestCase(unittest.TestCase):
self.client = Client() self.client = Client()
try: try:
self._pre_setup() self._pre_setup()
except (KeyboardInterrupt, SystemExit):
raise
except Exception: except Exception:
import sys import sys
result.addError(self, sys.exc_info()) result.addError(self, sys.exc_info())