Skip to content

Commit 49fa664

Browse files
committed
Check against realpath on Windows
1 parent fe6aaf7 commit 49fa664

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Lib/test/test_venv.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,15 @@ def test_upgrade_dependencies(self):
152152
bin_path = 'Scripts' if sys.platform == 'win32' else 'bin'
153153
python_exe = os.path.split(sys.executable)[1]
154154
with tempfile.TemporaryDirectory() as fake_env_dir:
155+
expect_exe = os.path.join(fake_env_dir, bin_path, python_exe)
156+
if sys.platform == 'win32':
157+
expect_exe = os.path.realpath(expect_exe)
155158

156159
def pip_cmd_checker(cmd):
157160
self.assertEqual(
158161
cmd,
159162
[
160-
os.path.join(fake_env_dir, bin_path, python_exe),
163+
expect_exe,
161164
'-m',
162165
'pip',
163166
'install',

0 commit comments

Comments
 (0)