From 0c485af05591ba869b8adb96802d1cf4b49fe28d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 21 Mar 2021 04:03:10 -0400 Subject: [PATCH] Cast values to str and retain other environ vars for Windows' sake --- setuptools/tests/test_develop.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index 0dea40bd79..a0e84b9a28 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -231,7 +231,7 @@ def test_editable_prefix(self, tmp_path, sample_project): # install the workaround self.install_workaround(site_packages) - env = dict(PYTHONPATH=site_packages) + env = dict(os.environ, PYTHONPATH=str(site_packages)) cmd = [ sys.executable, '-m', 'pip', @@ -246,4 +246,6 @@ def test_editable_prefix(self, tmp_path, sample_project): # now run 'sample' with the prefix on the PYTHONPATH bin = 'Scripts' if platform.system() == 'Windows' else 'bin' exe = prefix / bin / 'sample' + if sys.version_info < (3, 7) and platform.system() == 'Windows': + exe = str(exe) subprocess.check_call([exe], env=env)