In article <bar07a-pca....@satorlaser.homedns.org>,
 Ulrich Eckhardt <ulrich.eckha...@dominolaser.com> wrote:

> if you have an intermediate class derived 
> from unittest.TestCase, that class on its own will be considered as test 
> case! If this is not what you want but you still want common 
> functionality in a baseclass, create a mixin and then derive from both 
> the mixin and unittest.TestCase for the actual test cases.

Or, try another trick I picked up somewhere.  When you're done defining 
your test classes, delete the intermediate base class, so it won't be 
autodiscovered!

class MyBaseTestClass(unittest.TestCase):
   pass

class MyRealTest1(MyBaseTestClass):
   pass

class MyRealTest2(MyBaseTestCalss):
   pass

del MyBaseTestClass
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to