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:
Stephen Thorne
2019-04-19 04:31:00 +01:00
committed by Jelle Zijlstra
parent 4cd9a8ef91
commit 97240083c4

View File

@@ -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):