title: How to call functions from different base class
body: <p>Based on my limited Python knowledge, I have generated the following code snippet:</p>
  
  <pre><code>#import statements skipped
  class DTestWrapper(BaseA if inLinux else unittest.TestCase):
  
      def setUpDTest(self):
          if inLinux:
              super(BaseA , self).setUpTestCase()
          else:
              super(unittest.TestCase, self).setUp()
  
      def tearDownDTest(self):
          if inLinux:
              super(BaseA ,self).tearDownTestCase()
          else:
              super(unittest.TestCase,self).tearDown()
  </code></pre>
  
  <p><strong>Some background:</strong><br>
  <code>BaseA</code> is a customized class that is used to beautify the test output into a table. It has member functions <code>setUpTestCase</code>, <code>tearDownTestCase</code> and many others. </p>
  
  <p><strong>What I want to do</strong>:<br>
  I want to call different <code>setUp</code> and <code>tearDown</code> functions for my own class <code>DTestWrapper</code> based on different platforms as shown in the above code. When it is running on Linux, I would like to use <code>BaseA</code> <code>setUp</code> and <code>tearDown</code> functions; otherwise, I would like to use functions from python <code>unittest.TestCase</code>. I have another class <code>D</code> that inherits from <code>DTestWrapper</code>, it will override the <code>setUpDTest</code> method, but currently it is simply empty for testing purpose.</p>
  
  <p><strong>Question:</strong><br>
  When I ran the above code snippet, it seems that <code>setUp</code> or <code>setUpTestCase</code> are not called (tests all failed, they should not if they are called correctly). 
  My question is:</p>
  
  <p><strong>How could I call different <code>setUp</code> functions in <code>DTestWrapper</code>? Is this even possible to do?</strong> </p>
  
  <p>Since I am learning, any feedback is greatly appreciated. Thank you.</p>