summaryrefslogtreecommitdiffstats
path: root/run_tests
diff options
context:
space:
mode:
Diffstat (limited to 'run_tests')
-rwxr-xr-xrun_tests8
1 files changed, 5 insertions, 3 deletions
diff --git a/run_tests b/run_tests
index d7144b3c..a09ab382 100755
--- a/run_tests
+++ b/run_tests
@@ -42,9 +42,11 @@ def main(argv):
42 """The main entry.""" 42 """The main entry."""
43 # Add the repo tree to PYTHONPATH as the tests expect to be able to import 43 # Add the repo tree to PYTHONPATH as the tests expect to be able to import
44 # modules directly. 44 # modules directly.
45 topdir = os.path.dirname(os.path.realpath(__file__)) 45 pythonpath = os.path.dirname(os.path.realpath(__file__))
46 pythonpath = os.environ.get('PYTHONPATH', '') 46 oldpythonpath = os.environ.get('PYTHONPATH', None)
47 os.environ['PYTHONPATH'] = '%s:%s' % (topdir, pythonpath) 47 if oldpythonpath is not None:
48 pythonpath += os.pathsep + oldpythonpath
49 os.environ['PYTHONPATH'] = pythonpath
48 50
49 return run_pytest('pytest', argv) 51 return run_pytest('pytest', argv)
50 52