title: Unit tests organisation - how not to run base class tests?
body: <p>I have tests like this:</p>
  
  <pre><code>import unittest
  
  class TestBase(unittest.TestCase):
  
     def setUp(self):
        self.decorator = None
  
     def testA(self):
        data = someGeneratorA().generate()
        self.assertTrue(self.decorator.someAction(data))  
  
     def testB(self):
        data = someGeneratorB().generate()
        self.assertTrue(self.decorator.someAction(data))  
  
     def testC(self):
        data = someGeneratorC().generate()
        self.assertTrue(self.decorator.someAction(data))  
  
  
  class TestCaseA(TestBase):
  
     def setUp(self):
        self.decorator = SomeDecoratorA
  
  
  class TestCaseB(TestBase):
  
     def setUp(self):
        self.decorator = SomeDecoratorB
  </code></pre>
  
  <p>As you see, <strong>TestCaseA</strong> and <strong>TestCaseB</strong> is very similar, so I made <strong>TestBase</strong> class which implement body of <em>testA</em>, <em>testB</em> and <em>testC</em> method.</p>
  
  <p>TestCaseA different from TestCaseB only decorator parameter.</p>
  
  <p>So, I would like to ask, is any better way to organize my tests? And I have problem beacuse TestBase class - it's test's - shouldn't be runned ever (<em>self.decorator</em> is None so it will rase an exception)</p>