mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 00:37:10 +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:
@@ -1,9 +1,10 @@
|
||||
# Stubs for unittest
|
||||
|
||||
from mypy_extensions import NoReturn
|
||||
from typing import (
|
||||
Any, Callable, Dict, Iterable, Iterator, List, Optional, Pattern, Sequence,
|
||||
Set, FrozenSet, TextIO, Tuple, Type, TypeVar, Union, Generic,
|
||||
overload, ContextManager
|
||||
Any, Callable, ContextManager, Dict, FrozenSet, Generic, Iterable, Iterator,
|
||||
List, Optional, overload, Pattern, Sequence, Set, TextIO, Tuple, Type,
|
||||
TypeVar, Union
|
||||
)
|
||||
import logging
|
||||
import sys
|
||||
@@ -134,7 +135,7 @@ class TestCase:
|
||||
second: Union[Set[Any], FrozenSet[Any]], msg: Any = ...) -> None: ...
|
||||
def assertDictEqual(self, first: Dict[Any, Any], second: Dict[Any, Any],
|
||||
msg: Any = ...) -> None: ...
|
||||
def fail(self, msg: Any = ...) -> None: ...
|
||||
def fail(self, msg: Any = ...) -> NoReturn: ...
|
||||
def countTestCases(self) -> int: ...
|
||||
def defaultTestResult(self) -> TestResult: ...
|
||||
def id(self) -> str: ...
|
||||
|
||||
Reference in New Issue
Block a user