title: Using pytest fixtures from upper-level conftest.py in subdirectories
body: <p>I'm trying to use a fixture from a subdirectory that is defined in the parent directory's conftest.py however, I'm just constantly getting a &quot;fixture [name] not found&quot; error when doing so. Example of the directory structure:</p>
  <blockquote>
  <ul>
  <li>Tests/
  <ul>
  <li>conftest.py</li>
  <li>test_1.py</li>
  <li>test_subdirectory_1/
  <ul>
  <li>test_subdirectory_2/
  <ul>
  <li>conftest.py</li>
  <li>test_2.py</li>
  </ul>
  </li>
  </ul>
  </li>
  </ul>
  </li>
  </ul>
  </blockquote>
  <p>I'd like to use a fixture that has a session scope in the original conftest.py (in the Tests/ directory) in the test_2.py file. However whenever I run test_2.py from the test_subdirectory_2 folder, it gives me a fixture not found error.</p>
  <p>I'm doing this from the command line:
  <code>root@[ip]:/Test/test_subdirectory_1/test_subdirectory/2# pytest test_2.py</code></p>
  <p>and it spits out:
  <code>E      Fixture not found.</code></p>
  <p>however, if I move over to the root directory and I do:
  <code>root@[ip]:/Test# pytest -k &quot;test_name_from_test_2&quot; </code></p>
  <p>it works perfectly fine. I need to be able to run it from its own directory by just specifying the file name.</p>
  <p>Pytest documentation says this type of file structure should be acceptable as tests are supposed to be able to look upward in parent directories for additional fixtures. Can anyone tell me why this is happening?</p>
  <p>Here's the platform/version im using: <code>platform linux -- Python 3.8.5, pytest-6.1.0, py-1.9.0, pluggy-0.13.1</code></p>