Author erik_andersen
Recipients erik_andersen
Date 2007-11-19.18:32:56
SpamBayes Score 0.00326868
Marked as misclassified No
Message-id <>
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:57erik_andersensetspambayes_score: 0.00326868 -> 0.00326868
recipients: + erik_andersen
2007-11-19 18:32:56erik_andersensetspambayes_score: 0.00326868 -> 0.00326868
messageid: <>
2007-11-19 18:32:56erik_andersenlinkissue1466 messages
2007-11-19 18:32:56erik_andersencreate