mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 12:14:27 +08:00
Correct the type signature of assertRaisesRegexp (#2926)
assertRaisesRegexp is the old name of assertRaisesRegex, they are the same, just that the old one is deprecated.
This commit is contained in:
committed by
Jelle Zijlstra
parent
4cd9a8ef91
commit
97240083c4
@@ -184,12 +184,14 @@ class TestCase:
|
||||
msg: Any = ...) -> None: ...
|
||||
@overload
|
||||
def assertRaisesRegexp(self, # type: ignore
|
||||
exception: Union[Type[BaseException], Tuple[Type[BaseException], ...]],
|
||||
callable: Callable[..., Any] = ...,
|
||||
expected_exception: Union[Type[BaseException], Tuple[Type[BaseException], ...]],
|
||||
expected_regex: Union[str, bytes, Pattern[str], Pattern[bytes]],
|
||||
callable: Callable[..., Any],
|
||||
*args: Any, **kwargs: Any) -> None: ...
|
||||
@overload
|
||||
def assertRaisesRegexp(self,
|
||||
exception: Union[Type[_E], Tuple[Type[_E], ...]],
|
||||
expected_exception: Union[Type[_E], Tuple[Type[_E], ...]],
|
||||
expected_regex: Union[str, bytes, Pattern[str], Pattern[bytes]],
|
||||
msg: Any = ...) -> _AssertRaisesContext[_E]: ...
|
||||
|
||||
class FunctionTestCase(TestCase):
|
||||
|
||||
Reference in New Issue
Block a user