title: python, unittest, test a script with command line args
body: <p>I've written a python script that takes command line arguments and plays one round of Tic Tac Toe.<br>
  running it looks like this...</p>
  
  <blockquote>
    <p>run ttt o#xo##x## x 0 1 </p>
  </blockquote>
  
  <p>If the move is legal it then prints the new board layout and whether anyone won the game</p>
  
  <p>I have to write tests for it using unittest. I dont know how to test the whole script with various command line parameters, all the examples I've seen seem to just test individual functions within the script.
  Also the script uses <code>argparse</code> to parse the parameters</p>
  
  <p>Thanks!</p>