summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2018-10-03 04:38:39 (GMT)
committerGitHub <noreply@github.com>2018-10-03 04:38:39 (GMT)
commite006b39a40e0cd6a90c68f1107853ea2ed0ed54d (patch)
tree8c4399a683409ce32e694773d1235dd1edf830b0
parent97bfe8d3ebb0a54c8798f57555cb4152f9b2e1d0 (diff)
downloadcpython-e006b39a40e0cd6a90c68f1107853ea2ed0ed54d.zip
cpython-e006b39a40e0cd6a90c68f1107853ea2ed0ed54d.tar.gz
cpython-e006b39a40e0cd6a90c68f1107853ea2ed0ed54d.tar.bz2
Make it clear that the msg argument to assertWarns/assertWarnsRegex/assertRaisesRegex is keyword-only. (GH-9680)
A follow up to be4e5b89204283a62e369439025f00362d0424f6.
-rw-r--r--Doc/library/unittest.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst
index da8ce40..83aee1b 100644
--- a/Doc/library/unittest.rst
+++ b/Doc/library/unittest.rst
@@ -984,7 +984,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
@@ -1010,7 +1010,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
@@ -1051,7 +1051,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