title: Passing command line arguments in python by pytest
body: <p>I am able to pass command line arguments when running </p>
  
  <pre><code>python &lt;filename&gt;.py arg1
  </code></pre>
  
  <p>But when am trying to pass the command line arguments for running pytest it fails and gives error as below. Can you please advise.</p>
  
  <pre><code>pytest &lt;filename&gt;.py arg1
  ERROR: file not found: arg1
  </code></pre>
  
  <p>EDIT:</p>
  
  <p>For example am thinking of using it this way assuming I have passed an argument and am reading it via sys.argv:</p>
  
  <pre><code>import sys
  arg = sys.argv[3]
  def f():
      return 3
  
  def test_function():
      assert f() == arg
  </code></pre>