From: Nick Coghlan Date: Sun, 13 Jul 2008 12:36:42 +0000 (+0000) Subject: Correct a couple of errors in the updated catch_warning documentation (the Py3k versi... X-Git-Tag: v2.6b2~60 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=12c8660cc6f299464d61b3edd57a73dc6bcbffd7;p=thirdparty%2FPython%2Fcpython.git Correct a couple of errors in the updated catch_warning documentation (the Py3k version was fixed before being checked in) --- diff --git a/Doc/library/test.rst b/Doc/library/test.rst index 46d21ccae45d..4c957599e15c 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"