title: Module Import Error running py.test with modules on Path
body: <p>I'm unable to import my module for testing in the way that I'd like. I'm running all of this in a virtualenv on 2.7.2</p>
  
  <p>I have a directory structure like</p>
  
  <pre><code>/api
      /api
          __init__.py
          my_module.py
      /tests
          my_module_test.py
  </code></pre>
  
  <p>I have my PYTHONPATH set to /Path/api/. I CD into /Path/api and run the following</p>
  
  <pre><code> py.test tests/my_module_test.py   
  </code></pre>
  
  <p>It does not work in the following case:</p>
  
  <ol>
  <li>When I have the following at the top of my_module_test.py <code>from api.my_module import my_function</code></li>
  </ol>
  
  <p>It does work in the following case:</p>
  
  <ol>
  <li>When I have the following at the top of my_module_test.py <code>from my_module import my_function</code></li>
  </ol>
  
  <p>Why am I not able to import my module as in case 1? </p>