[issue3781] warnings.catch_warnings fails gracelessly when recording warnings but no warnings are emitted

Nick Coghlan report at bugs.python.org
Wed Sep 10 12:06:11 CEST 2008


Nick Coghlan <ncoghlan at gmail.com> added the comment:

Not quite that basic for the warnings.catch_warnings() part. I plan to
leave the current warnings.catch_warnings() alone (aside from adding
some re-entrancy checks), and add back a
test.test_support.check_warnings() that uses a WarningsRecorder object
to simplify the specific use cases in the Python regression test suite
(i.e. at least adding back the easy attribute access, and possibly other
things if there are other common features of the way we use it in the
tests).

The patch will make it clearer (working on that now).

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3781>
_______________________________________


More information about the Python-bugs-list mailing list