title: Pytest ModuleNotFoundError
body: <p>Even for as long as I've worked in Python, I still occasionally run into issues with my package structure.</p>
  
  <p>I'm trying to run <code>$ pipenv run pytest</code> from the root of the directory structure below (i.e. <code>..</code> above src/)</p>
  
  <pre><code>src/
     physics/
        __init__.py
        pathing.py
     road/
        tests/
            __init__.py
            test_traffic.py
        __init__.py
        traffic.py
     __init__.py
     main.py
  </code></pre>
  
  <p>traffic.py:</p>
  
  <pre><code>
      from physics import pathing
  
      class Intersection():
          ...
  
      class Vehicle():
          ...
  
  </code></pre>
  
  <p>test_traffic.py</p>
  
  <pre><code>
      from src.road.traffic import Intersection, Vehicle
  
      def test_intersection():
          ...
  
  </code></pre>
  
  <p>However, I get hit with:</p>
  
  <pre><code>======================================================================= ERRORS ========================================================================
  ___________________________________________________ ERROR collecting src/road/tests/test_traffic.py ___________________________________________________
  ImportError while importing test module '/Users/justian/scripts/py-traffic-sim/src/road/tests/test_traffic.py'.
  Hint: make sure your test modules/packages have valid Python names.
  Traceback:
  src/road/tests/test_traffic.py:1: in &lt;module&gt;
      from src.road.traffic import Intersection, Vehicle
  src/road/traffic.py:13: in &lt;module&gt;
      from physics import pathing
  E   ModuleNotFoundError: No module named 'physics'
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  ================================================================== 1 error in 0.38s ===================================================================
  </code></pre>
  
  <p>It looks like I'm misunderstanding how pytest is importing my modules or misunderstanding how my modules are referencing one another. Both <code>$ pipenv run pytest</code> and <code>$ pipenv run python -m pytest</code> produce the same result.</p>
  
  <p>How can I properly import <code>Intersection</code> and <code>Vehicle</code> into test_traffic.py?</p>