From 13e84dc004571256802723bc41f18cf478706b84 Mon Sep 17 00:00:00 2001 From: PRAJWAL M <30733262+PrajwalM2212@users.noreply.github.com> Date: Tue, 30 Oct 2018 21:41:16 +0530 Subject: [PATCH] unittest: Complete assertRaisesRegex (#2568) fixes #2523 --- stdlib/3/unittest/__init__.pyi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/stdlib/3/unittest/__init__.pyi b/stdlib/3/unittest/__init__.pyi index 07a69aff0..5f0bd4833 100644 --- a/stdlib/3/unittest/__init__.pyi +++ b/stdlib/3/unittest/__init__.pyi @@ -81,12 +81,14 @@ class TestCase: msg: Any = ...) -> _AssertRaisesContext[_E]: ... @overload def assertRaisesRegex(self, # type: ignore - exception: Union[Type[BaseException], Tuple[Type[BaseException], ...]], + 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 assertRaisesRegex(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]: ... @overload def assertWarns(self, # type: ignore