tiramisu/test/autopath.py

15 lines
353 B
Python
Raw Normal View History

"""automatically sets the PYTHONPATH before running the unit tests
This is supposed to be used in development mode (i.e. testing from a fresh
checkout)
"""
from os.path import dirname, abspath, join, normpath
import sys
HERE = dirname(abspath(__file__))
2012-07-13 11:22:00 +02:00
PATH = normpath(join(HERE, '..', 'src'))
if PATH not in sys.path:
sys.path.insert(1, PATH)
2012-07-13 11:22:00 +02:00