ignored test cases in unittest

Roy Smith roy at panix.com
Sat Aug 15 21:12:14 EDT 2009


In article 
<e30e5028-b50d-4a98-a70e-fca5b2a1c498 at b14g2000yqd.googlegroups.com>,
 Terry <terry.yinzhe at gmail.com> wrote:

> Hi,
> 
> I have some 100s unittest cases with my python program. And sometimes,
> I did quick-and-dirty work by ignoring some test cases by adding an
> 'x' (or something else) to the beginning of the case name.
> As time pass by, it's very hard for me to find which test cases are
> ignored.

If you are consistent in how you do this (i.e. always add an "x" to the 
beginning of the name), it should be trivial to find them all.  I'm sure I 
could whip up some introspection based method, but it's easier and faster 
to just do "grep 'def.*xtest' *.py".



More information about the Python-list mailing list