mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Addition of -c command line option to unittest, to handle ctrl-c during a test run more elegantly
This commit is contained in:
parent
ee627883a7
commit
fa2f1cdcbb
6 changed files with 319 additions and 16 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue