title: How to test command line applications in Python?
body: <p>I know Python <code>unittest</code>. I have some experience using it for testing Python subprograms.</p>
  
  <p>Now I need to add testing my command line application (<em>not</em> just a Python function) written in Python. I want to call it with certain arguments and certain input in stdin and test output in stdout.</p>
  
  <p>How to integrate testing a command line tool with other <code>unittest</code> test cases?</p>
  
  <p>Or what to use instead of <code>unittest</code>?</p>