Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 327433f

Browse files
committed
Divide the context manager signature from the normal one for consistency with the other methods.
1 parent 9c02c2f commit 327433f

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

Doc/library/unittest.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -989,7 +989,8 @@ Test cases
989989
:meth:`failUnlessRaises`; use :meth:`assertRaises`.
990990

991991

992-
.. method:: assertRaisesRegexp(exception, regexp[, callable, ...])
992+
.. method:: assertRaisesRegexp(exception, regexp, callable, *args, **kwds)
993+
assertRaisesRegexp(exception, regexp)
993994

994995
Like :meth:`assertRaises` but also tests that *regexp* matches
995996
on the string representation of the raised exception. *regexp* may be
@@ -1041,7 +1042,8 @@ Test cases
10411042
.. versionadded:: 3.2
10421043

10431044

1044-
.. method:: assertWarnsRegexp(warning, regexp[, callable, ...])
1045+
.. method:: assertWarnsRegexp(warning, regexp, callable, *args, **kwds)
1046+
assertWarnsRegexp(warning, regexp)
10451047

10461048
Like :meth:`assertWarns` but also tests that *regexp* matches on the
10471049
message of the triggered warning. *regexp* may be a regular expression

0 commit comments

Comments
 (0)