summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2008-07-13 12:36:42 (GMT)
committerNick Coghlan <ncoghlan@gmail.com>2008-07-13 12:36:42 (GMT)
commit12c8660cc6f299464d61b3edd57a73dc6bcbffd7 (patch)
treeb929f1ec6954d5434f02fdb3494e29a5d7168487
parent38469e271929399c12d6770d91958d8abac7433a (diff)
downloadcpython-12c8660cc6f299464d61b3edd57a73dc6bcbffd7.zip
cpython-12c8660cc6f299464d61b3edd57a73dc6bcbffd7.tar.gz
cpython-12c8660cc6f299464d61b3edd57a73dc6bcbffd7.tar.bz2
Correct a couple of errors in the updated catch_warning documentation (the Py3k version was fixed before being checked in)
-rw-r--r--Doc/library/test.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/test.rst b/Doc/library/test.rst
index 46d21cc..4c95759 100644
--- a/Doc/library/test.rst
+++ b/Doc/library/test.rst
@@ -305,9 +305,9 @@ The :mod:`test.test_support` module defines the following functions:
with catch_warning() as w:
warnings.simplefilter("always")
warnings.warn("foo")
- assert w.last == "foo"
+ assert str(w.message) == "foo"
warnings.warn("bar")
- assert w.last == "bar"
+ assert str(w.message) == "bar"
assert str(w.warnings[0].message) == "foo"
assert str(w.warnings[1].message) == "bar"