title: Pytest without arguments has wrong working directory
body: <p>I'm attempting to use pytest to automate my test process. I have several files' worth of test cases (<code>test_methodA.py</code>, <code>test_methodB.py</code>, etc.) in a folder called <code>test</code>, which is itself in the top-level directory of my project. These tests are all running on a program contained in a single file - <code>program.py</code>. This <code>program.py</code> file is also in the top-level directory, as is a folder's worth of configuration files <code>confs</code> that it needs to function properly.</p>
  
  <p>When I run pytest from the top-level directory with an argument of one of my test files:</p>
  
  <pre><code>$ pytest test/test_methodA.py
  </code></pre>
  
  <p>the program runs properly and passes the tests. However, if I just run pytest without arguments:</p>
  
  <pre><code>$ pytest
  </code></pre>
  
  <p>all of my tests fail because my program's initialization methods throw a <code>FileNotFoundError</code> when trying to access configuration files.</p>
  
  <p>I've experimented with this behavior, and determined that the direct cause is pytest using the incorrect working directory (the directory one level above the project's top-level directory). For example, if I do</p>
  
  <pre><code>$ cd test
  $ pytest
  </code></pre>
  
  <p>all of the tests work correctly. I've also confirmed this by having one of the tests print <code>os.getcwd()</code> to the console. </p>
  
  <p>No directories involved in the project contain an <code>__init__.py</code> file, which most of the search results I found for this issue are focused on. What other causes would there be for this issue?</p>