summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2013-07-31 02:31:06 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2013-07-31 02:31:06 (GMT)
commit778cba7f29d26d44404bacd926480d8049e454d3 (patch)
treea3a2518650499223f4058f71b5b70626cbd2255a
parentcdc75d967b777db0e4658bb6d500d4fcfca5fecb (diff)
downloadcpython-778cba7f29d26d44404bacd926480d8049e454d3.zip
cpython-778cba7f29d26d44404bacd926480d8049e454d3.tar.gz
cpython-778cba7f29d26d44404bacd926480d8049e454d3.tar.bz2
Issue #18573: More copy-paste fixes to assertWarns entry.
-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 7671f65..845bf0a 100644
--- a/Doc/library/unittest.rst
+++ b/Doc/library/unittest.rst
@@ -897,12 +897,12 @@ Test cases
Test that a warning is triggered when *callable* is called with any
positional or keyword arguments that are also passed to
:meth:`assertWarns`. The test passes if *warning* is triggered and
- fails if it isn't. Also, any unexpected exception is an error.
+ fails if it isn't. Any exception is an error.
To catch any of a group of warnings, a tuple containing the warning
classes may be passed as *warnings*.
If only the *warning* and possibly the *msg* arguments are given,
- returns a context manager so that the code under test can be written
+ return a context manager so that the code under test can be written
inline rather than as a function::
with self.assertWarns(SomeWarning):
@@ -915,7 +915,7 @@ Test cases
:attr:`warning` attribute, and the source line which triggered the
warnings in the :attr:`filename` and :attr:`lineno` attributes.
This can be useful if the intention is to perform additional checks
- on the exception raised::
+ on the warning caught::
with self.assertWarns(SomeWarning) as cm:
do_something()