title: Python unittest with expensive setup
body: <p>My test file is basically:</p>
  
  <pre><code>class Test(unittest.TestCase):
      def testOk():
          pass
  
  if __name__ == "__main__":
      expensiveSetup()
      try:
          unittest.main()
      finally:
          cleanUp()
  </code></pre>
  
  <p>However, I do wish to run my test through Netbeans testing tools, and to do that I need unittests that don't rely on an environment setup done in <strong>main</strong>. Looking at <a href="https://stackoverflow.com/questions/402483/caching-result-of-setup-using-python-unittest">Caching result of setUp() using Python unittest</a> - it recommends using Nose. However, I don't think Netbeans supports this. I didn't find any information indicating that it does. Additionally, I am the only one here actually writing tests, so I don't want to introduce additional dependencies for the other 2 developers unless they are needed.</p>
  
  <p>How can I do the setup and cleanup once for all the tests in my TestSuite?</p>
  
  <p>The expensive setup here is creating some files with dummy data, as well as setting up and tearing down a simple xml-rpc server. I also have 2 test classes, one testing locally and one testing all methods over xml-rpc.</p>