title: Pytest unrecognized arguments when importing file with argparse
body: <p>I have file settings.py which looks like:</p>
  
  <pre><code>import argparse
  
  
  parser = argparse.ArgumentParser()
  parser.add_argument("-var", "--variable", dest="variable", default="qwerty",
                      type=str, help="specify variable")
  args = parser.parse_args()
  
  variable = args.variable
  </code></pre>
  
  <p>Test file test_var.py imports that settings.py:</p>
  
  <pre><code>import settings
  
  
  class TestVar:
      def test_001(self):
          pass
  </code></pre>
  
  <p>When I laucnh pytest var_test.py::TestVar.test_001 following error is raised:</p>
  
  <pre><code>usage: _jb_pytest_runner.py [-h] [-var VARIABLE]
  _jb_pytest_runner.py: error: unrecognized arguments: var_test.py::TestVar::test_001
  
  var_test.py:None (var_test.py)
  var_test.py:1: in &lt;module&gt;
      import settings
  settings.py:7: in &lt;module&gt;
      args = parser.parse_args()
  C:\Python36\lib\argparse.py:1733: in parse_args
      self.error(msg % ' '.join(argv))
  C:\Python36\lib\argparse.py:2389: in error
      self.exit(2, _('%(prog)s: error: %(message)s\n') % args)
  C:\Python36\lib\argparse.py:2376: in exit
      _sys.exit(status)
  E   SystemExit: 2
  </code></pre>
  
  <p>If settings.py is not imported then test executes without error. Why that error raises and how can I import setting.py in test file? </p>