title: Change cwd before running tests
body: <p>I have a bunch of <code>unittest</code> test cases in separate directories. There is also a directory which just contains helper scripts for the tests. So my file tree looks like this</p>
  
  <pre><code>test_dir1
  test_dir2
  test_dir3
  helper_scripts
  </code></pre>
  
  <p>Each python file in <code>test_dir*</code> will have these lines:</p>
  
  <pre><code>import sys
  sys.path.append('../helper_scripts')
  import helper_script
  </code></pre>
  
  <p>This all works fine, as long as I run the tests from within their directory. However, I would like to be at the project root and just run:</p>
  
  <pre><code>py.test
  </code></pre>
  
  <p>and have it traverse all the directories and run each test it finds. The problem is that the tests are being run from the wrong directory, so the <code>sys.path.append</code> doesn't append the <code>helper_scripts</code> directory, it appends the parent of the project root. This makes all the imports fail with an <code>Import Error</code>.</p>
  
  <p>Is there a way to tell <code>py.test</code> to run the test scripts from their directory? ie. change the cwd before executing them? If not, is there another test runner I can use that will?</p>