I\'m setting up Travis-CI for my project, and oddly, I can\'t import my project:
$ python tests/tests.py
Traceback (most recent call last):
File \"tests/te
To be quick, you can fix the problem more elegantly by adding the following to the before_script
stage:
export PYTHONPATH=$PYTHONPATH:$(pwd)
The better way(but with a little more effort) is what Brian Cain has suggested, namely, write a setup.py
file and add pip install .
to the install
stage.
Or if you're using a makefile you can have command that does it as the following one.
test:
$(shell export PYTHONPATH=$PYTHONPATH:$(pwd))
python setup.py test