[issue10535] Enable warnings by default in unittest

Ezio Melotti report at bugs.python.org
Mon Nov 29 09:41:38 CET 2010


Ezio Melotti <ezio.melotti at gmail.com> added the comment:

Attached a new patch.

A few comments about it:
1) A new category for UnittestWarnings could still be added to make it easier to filter warnings using the -W python flags and thus providing more control;
2) I didn't change the deprecation message in the patch -- I will probably do it in a separate commit;
3) The patch touches a few unrelated unittest/test/test_*.py files that were checking for the number of args explicitely;
4) In order to test the different combinations of flags/args I created a new _test_warnings.py file called from test_runner.py via subprocess;
5) unittest warnings are now printed only once even when 'always' is passed as an arg, but not when it's set with -W (this somehow addresses the "limitation" described in my previous message);

----------
Added file: http://bugs.python.org/file19867/issue10535-2.diff

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


More information about the Python-bugs-list mailing list