Kaydet (Commit) b4d0ef91 authored tarafından Georg Brandl's avatar Georg Brandl

#6513: fix example code: warning categories are classes, not instances.

üst 130ae151
......@@ -204,7 +204,7 @@ check::
fxn()
# Verify some things
assert len(w) == 1
assert isinstance(w[-1].category, DeprecationWarning)
assert issubclass(w[-1].category, DeprecationWarning)
assert "deprecated" in str(w[-1].message)
One can also cause all warnings to be exceptions by using ``error`` instead of
......
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