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)