[issue3780] No way to write unit tests for warnings

Brett Cannon report at bugs.python.org
Fri Sep 5 00:36:43 CEST 2008

Brett Cannon <brett at python.org> added the comment:

It sounds like you are trying to get around "once"/"default" rules to
see all warnings raised. Why can't you use catch_warnings() and do
``simplefilter("always")`` or use "error"? Otherwise you can force the
importing and use of the pure Python implementation of warnings if you
really want to continue to use your hacked version of warn_explicit (see
test_warnings on how to control whether the C implementation gets used
or not).

nosy: +brett.cannon

Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list