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:
parent
38469e2719
commit
12c8660cc6
|
@ -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"
|
||||
|
||||
|
|
Loading…
Reference in New Issue