mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
Change the return type of unittest.TestCase.fail() to NoReturn (#1843)
* Change the return type of unittest.TestCase.fail() to NoReturn * Import mypy_extensions.NoReturn instead of typing.NoReturn
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
# Only a subset of functionality is included.
|
||||
|
||||
from mypy_extensions import NoReturn
|
||||
from typing import (Any, Callable, Dict, FrozenSet, Iterable, List, Optional,
|
||||
overload, Pattern, Sequence, Set, TextIO, Tuple, Type,
|
||||
TypeVar, Union)
|
||||
@@ -131,7 +132,7 @@ class TestCase(Testable):
|
||||
msg: object = ...) -> None: ...
|
||||
def assertNotIsInstance(self, obj: Any, cls: Union[type, Tuple[type, ...]],
|
||||
msg: object = ...) -> None: ...
|
||||
def fail(self, msg: object = ...) -> None: ...
|
||||
def fail(self, msg: object = ...) -> NoReturn: ...
|
||||
def countTestCases(self) -> int: ...
|
||||
def defaultTestResult(self) -> TestResult: ...
|
||||
def id(self) -> str: ...
|
||||
|
||||
Reference in New Issue
Block a user