title: Nose test script with command line arguments
body: <p>I would like to be able to run a nose test script which accepts command line arguments. For example, something along the lines:</p>
  
  <p>test.py</p>
  
  <pre><code>import nose, sys
  
  def test():
      # do something with the command line arguments
      print sys.argv
  
  if __name__ == '__main__':
      nose.runmodule()
  </code></pre>
  
  <p>However, whenever I run this with a command line argument, I get an error:</p>
  
  <pre><code>$ python test.py arg
  E
  ======================================================================
  ERROR: Failure: ImportError (No module named arg)
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/nose-0.11.1-py2.6.egg/nose/loader.py", line 368, in loadTestsFromName
      module = resolve_name(addr.module)
    File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/nose-0.11.1-py2.6.egg/nose/util.py", line 334, in resolve_name
      module = __import__('.'.join(parts_copy))
  ImportError: No module named arg
  
  ----------------------------------------------------------------------
  Ran 1 test in 0.001s
  
  FAILED (errors=1)
  </code></pre>
  
  <p>Apparently, nose tries to do something with the arguments passed in sys.argv. Is there a way to make nose ignore those arguments?</p>