title: Python unittest setUp function
body: <p>I am relatively new to Python. According to <a href="http://docs.python.org/dev/library/unittest.html#unittest.TestCase.setUp" rel="noreferrer">unittest.setUp</a> documentation:</p>
  
  <blockquote>
    <p>setUp()<br>
    Method called to prepare the test fixture. <strong>This is called immediately before calling the test method</strong>; any exception raised by this method will be considered an error rather than a test failure. The default implementation does nothing.</p>
  </blockquote>
  
  <p>My question about <code>setUp</code> is as follows:</p>
  
  <p>In our testing code base, I have seen that we customized the Python testing framework by inheriting from <code>unittest.TestCase</code>. Originally, <code>unittest.TestCase</code> has names <code>setUp</code> and <code>tearDown</code>.In the customized class, we have <code>setUpTestCase</code> and <code>tearDownTestCase</code>. So each time those two functions will be called instead of those original counterparts.</p>
  
  <p>My questions are: </p>
  
  <ol>
  <li>How are those <code>setUp</code> and <code>tearDown</code> functions being called by the underlying test runner?</li>
  <li>Is it required that those functions used to set up test cases should start with <code>setUp</code> and functions used to tear down test cases should start  with <code>tearDown</code>? Or it can be named as any valid identifier?</li>
  </ol>
  
  <p>Thank you.</p>