[Python-ideas] unittest and warnings

Giampaolo Rodola' g.rodola at gmail.com
Mon Jun 17 02:32:24 CEST 2013


One of the features I like the most in the new unittest2 module is the
possibility to skip tests and how they are included in the final result
(e.g. FAILED (errors=2, failures=3, *skipped=5*)).
After http://bugs.python.org/issue10093 it is not rare that different
ResourceWarnings appear while running tests.
Personally I consider these warnings as something which needs to be fixed
so after I run tests I often scroll my console window back up to see
whether there were warnings.
Would it make sense for unittest module to keep track of them so that they
get included in the final test result as it currently happens for skipped
tests?

Side note: unittest provides some "skip-related" APIs such unittest.skip*,
TestResult.skipped and others but I don't think something similar would be
necessary except maybe a TestResult.warnings list similar to
TestResult.skipped.

Regards,

- Giampaolo
https://code.google.com/p/pyftpdlib
https://code.google.com/p/psutil
https://code.google.com/p/pysendfile
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130617/00f424a2/attachment.html>


More information about the Python-ideas mailing list