title: Change the directory that pytest uses for testing, but not output location
body: <p>I have this kind of directory structure:</p>
  <pre><code>repo/
  ├── src/
  |   ├── assets
  |   |   └── wordlist.txt
  |   └── main.py
  └── tests
       └── test_cases.py
  </code></pre>
  <p>And I want to test a class in the main.py file. That classes reads from a word list in the assets directory. But when i run the test from the tests directory it uses that directory as the starting point so when init. the class it can't find the word list. And I get the error <code>FileNotFoundError: [Errno 2] No such file or directory: assets/wordlist.txt </code>.</p>
  <p>So how do I change the directory pytest usages for the test but still keep the output in the tests folder. I tried to use the <code>pytest.ini</code> file and change the <code>pythonpath = . src</code> but that just seems to move the output to the repo directory and keeps the file not found error.</p>