Skip to content

Commit 3469893

Browse files
fix pythonpath in test_setuptools_support
1 parent d9e1602 commit 3469893

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

testing/test_setuptools_support.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,15 @@ def makeinstall(version):
5353

5454

5555
def check(packagedir, expected_version, **env):
56+
57+
old_pythonpath = os.environ.get('PYTHONPATH')
58+
if old_pythonpath:
59+
pythonpath = '{}:{}'.format(old_pythonpath, packagedir)
60+
else:
61+
pythonpath = str(packagedir)
5662
subprocess.check_call(
5763
[sys.executable, "-c", SCRIPT, expected_version],
58-
env=dict(os.environ, PYTHONPATH=".:" + str(packagedir), **env),
64+
env=dict(os.environ, PYTHONPATH=pythonpath, **env),
5965
)
6066

6167

0 commit comments

Comments
 (0)