Message57648
When a unittest test case raises an Exception, that test case is
considered a failure. However, raising NotImplementedError is not a
failure. It is something completely normal during development and
simply indicates that the functionality has not yet been implemented.
Compare this to a test case that genuinely fails, which means that the
implementation does something different from what is is supposed to do.
I therefore think test cases raising NotImplementedError should not be
treated as failures, but be reported separately as what they are --
parts of the program that have not yet been implemented. Reporting such
test cases as failures will give a lot of failure warnings that may
detract attention from those cases that are genuinely errors. Also,
SimpleTextRunner will report a lot of useless stack traces for these
cases, thereby makeing it harder to find the stack traces for those
tests that realy failed.
I have made a patch to unittest that reports such cases as "not
implemented" rather than as failures. This includes changes to the
documentation and unit test case for unittest and doctest.
I have included
"added/changed in version 2.6" remarks in the documentation, so
you have to changed these if the patch gets into some other version.
Patch against 59056 attached |
File name |
Uploaded |
unittest.diff
|
erik_andersen,
2007-11-19.18:32:56
|
|
Date |
User |
Action |
Args |
2007-11-19 18:32:57 | erik_andersen | set | spambayes_score: 0.00326868 -> 0.0032686817 recipients:
+ erik_andersen |
2007-11-19 18:32:56 | erik_andersen | set | spambayes_score: 0.00326868 -> 0.00326868 messageid: <1195497176.97.0.346007507072.issue1466@psf.upfronthosting.co.za> |
2007-11-19 18:32:56 | erik_andersen | link | issue1466 messages |
2007-11-19 18:32:56 | erik_andersen | create | |
|