]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Make it clear that the msg argument to assertWarns/assertWarnsRegex/assertRaisesRegex...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 3 Oct 2018 04:44:18 +0000 (21:44 -0700)
committerGitHub <noreply@github.com>
Wed, 3 Oct 2018 04:44:18 +0000 (21:44 -0700)
A follow up to be4e5b89204283a62e369439025f00362d0424f6.
(cherry picked from commit e006b39a40e0cd6a90c68f1107853ea2ed0ed54d)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
Doc/library/unittest.rst

index 17deeddd37d179f92c13477d7ecca45a02b9a3d1..dd85e9e33d9c8cc1a213e173d79277209c5c1aac 100644 (file)
@@ -965,7 +965,7 @@ Test cases
 
 
    .. method:: assertRaisesRegex(exception, regex, callable, *args, **kwds)
-               assertRaisesRegex(exception, regex, msg=None)
+               assertRaisesRegex(exception, regex, *, msg=None)
 
       Like :meth:`assertRaises` but also tests that *regex* matches
       on the string representation of the raised exception.  *regex* may be
@@ -991,7 +991,7 @@ Test cases
 
 
    .. method:: assertWarns(warning, callable, *args, **kwds)
-               assertWarns(warning, msg=None)
+               assertWarns(warning, *, msg=None)
 
       Test that a warning is triggered when *callable* is called with any
       positional or keyword arguments that are also passed to
@@ -1032,7 +1032,7 @@ Test cases
 
 
    .. method:: assertWarnsRegex(warning, regex, callable, *args, **kwds)
-               assertWarnsRegex(warning, regex, msg=None)
+               assertWarnsRegex(warning, regex, *, msg=None)
 
       Like :meth:`assertWarns` but also tests that *regex* matches on the
       message of the triggered warning.  *regex* may be a regular expression