From f29697d623b19dad7b9684c28b3388b02c384e15 Mon Sep 17 00:00:00 2001 From: Joe Rickerby Date: Tue, 23 Apr 2019 22:17:03 +0100 Subject: [PATCH] Retain PYTHONPATH if already in env --- bin/run_test.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bin/run_test.py b/bin/run_test.py index cbf8bee3..801aed0e 100755 --- a/bin/run_test.py +++ b/bin/run_test.py @@ -9,9 +9,11 @@ test_utils_dir = os.path.join(project_root, 'test', 'shared') def single_run(test_project): # set up an environment that gives access to the test utils env = os.environ.copy() - env.update({ - 'PYTHONPATH': test_utils_dir, - }) + + if 'PYTHONPATH' in env: + env['PYTHONPATH'] += os.pathsep + test_utils_dir + else: + env['PYTHONPATH'] = test_utils_dir # run the test subprocess.check_call(