Commit 12c8660c authored by Nick Coghlan's avatar Nick Coghlan

Correct a couple of errors in the updated catch_warning documentation (the...

Correct a couple of errors in the updated catch_warning documentation (the Py3k version was fixed before being checked in)
parent 38469e27
......@@ -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"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment