title: How to switch between test code and production code in python?
body: <p>I have a project that is constantly undergoing development. I have installed a release of the project in my python distribution's <code>site-packages</code> directory using the <code>setup.py</code> script for the project. </p>
  
  <p>However, when I make changes to the project I would like my test scripts to find the files that are under the project's directory and not those that it finds in <code>site-packages</code>. What is the proper way to do this? I only know of one approach which is to modify the search path in the test script itself using <code>sys.path</code>, but then it means that I cannot use the same scripts to test the "installed" version of my codes without editing the <code>sys.path</code> again.</p>