Correct a couple of errors in the updated catch_warning documentation (the Py3k version was fixed before being checked in)

This commit is contained in:
Nick Coghlan 2008-07-13 12:36:42 +00:00
parent 38469e2719
commit 12c8660cc6
1 changed files with 2 additions and 2 deletions

View File

@ -305,9 +305,9 @@ The :mod:`test.test_support` module defines the following functions:
with catch_warning() as w: with catch_warning() as w:
warnings.simplefilter("always") warnings.simplefilter("always")
warnings.warn("foo") warnings.warn("foo")
assert w.last == "foo" assert str(w.message) == "foo"
warnings.warn("bar") warnings.warn("bar")
assert w.last == "bar" assert str(w.message) == "bar"
assert str(w.warnings[0].message) == "foo" assert str(w.warnings[0].message) == "foo"
assert str(w.warnings[1].message) == "bar" assert str(w.warnings[1].message) == "bar"