Add unittest.result.failfast. (#3596)

This commit is contained in:
Benjamin Peterson
2020-01-09 11:39:10 -08:00
committed by Sebastian Rittau
parent 955e9c7da4
commit fe236ed8b2
2 changed files with 7 additions and 2 deletions

View File

@@ -6,7 +6,7 @@ from types import ModuleType
from unittest.async_case import *
from unittest.case import *
from unittest.loader import *
from unittest.result import *
from unittest.result import TestResult as TestResult
from unittest.runner import *
from unittest.signals import *
from unittest.suite import *

View File

@@ -1,4 +1,4 @@
from typing import List, Optional, Tuple, Type, Union
from typing import Any, Callable, List, Optional, Tuple, Type, TypeVar, Union
from types import TracebackType
import unittest.case
@@ -8,6 +8,11 @@ _SysExcInfoType = Union[
Tuple[None, None, None],
]
_F = TypeVar("_F", bound=Callable[..., Any])
# undocumented
def failfast(method: _F) -> _F: ...
class TestResult:
errors: List[Tuple[unittest.case.TestCase, str]]