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); |