title: Python test whole script
body: <p>I have a Python script. I use <code>unittest</code> for tests, but how can I test whole script.</p>
  
  <p>My idea is something like this:</p>
  
  <pre><code>def test_script(self):
      output=runScript('test.py --a 5 --b 3')
      self.assertEqual(output, '8') 
  </code></pre>
  
  <p>test.py takes argument a and b and print a+b, in this case 8</p>