Skip to main content
2 of 3
added note about using nose
samplebias
  • 38k
  • 6
  • 110
  • 104

You need to make sure your PYTHONPATH is set correctly so the command-line interpreter can find your packages, or run your test cases from within Eclipse Pydev. Update: Another option: running your tests using nose might make things a bit easier, since it can auto-discover packages and test cases.

If your project is laid out like so:

/home/user/dev/ src/pkg1/ mod1.py test/ mod1_test.py 

Use: PYTHONPATH=$HOME/dev/src python test/mod1_test.py. I'd also recommend using distribute and virtualenv to set up your project for development.

samplebias
  • 38k
  • 6
  • 110
  • 104