diff options
author | Michael Foord <fuzzyman@voidspace.org.uk> | 2010-03-26 03:18:31 (GMT) |
---|---|---|
committer | Michael Foord <fuzzyman@voidspace.org.uk> | 2010-03-26 03:18:31 (GMT) |
commit | fa2f1cdcbb6cf2d31066605b0f71d8fe3ed337aa (patch) | |
tree | b19cee2577faee50d49922b64252191f383c4ed7 /Lib/unittest/runner.py | |
parent | ee627883a7d57d783ccab1fb4ae1850f7c26d9b1 (diff) | |
download | cpython-fa2f1cdcbb6cf2d31066605b0f71d8fe3ed337aa.zip cpython-fa2f1cdcbb6cf2d31066605b0f71d8fe3ed337aa.tar.gz cpython-fa2f1cdcbb6cf2d31066605b0f71d8fe3ed337aa.tar.bz2 |
Addition of -c command line option to unittest, to handle ctrl-c during a test run more elegantly
Diffstat (limited to 'Lib/unittest/runner.py')
-rw-r--r-- | Lib/unittest/runner.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/unittest/runner.py b/Lib/unittest/runner.py index fd56a30..5169d20 100644 --- a/Lib/unittest/runner.py +++ b/Lib/unittest/runner.py @@ -4,6 +4,7 @@ import sys import time from . import result +from .signals import registerResult __unittest = True @@ -138,6 +139,7 @@ class TextTestRunner(object): def run(self, test): "Run the given test case or test suite." result = self._makeResult() + registerResult(result) result.failfast = self.failfast startTime = time.time() startTestRun = getattr(result, 'startTestRun', None) |