@@ -1001,7 +1001,7 @@ def test_env_finds_the_correct_executables(tmp_dir, manager):
1001
1001
venv = VirtualEnv (venv_path )
1002
1002
1003
1003
assert Path (venv .python ).name == expected_executable
1004
- assert Path (venv .pip ).name == expected_pip_executable
1004
+ assert Path (venv .pip ).name . startswith ( expected_pip_executable . split ( "." )[ 0 ])
1005
1005
1006
1006
1007
1007
def test_env_finds_the_correct_executables_for_generic_env (tmp_dir , manager ):
@@ -1021,6 +1021,10 @@ def test_env_finds_the_correct_executables_for_generic_env(tmp_dir, manager):
1021
1021
sys .version_info [0 ], sys .version_info [1 ], ".exe" if WINDOWS else ""
1022
1022
)
1023
1023
1024
+ if WINDOWS :
1025
+ expected_executable = "python.exe"
1026
+ expected_pip_executable = "pip.exe"
1027
+
1024
1028
assert Path (venv .python ).name == expected_executable
1025
1029
assert Path (venv .pip ).name == expected_pip_executable
1026
1030
@@ -1079,6 +1083,12 @@ def test_env_finds_fallback_executables_for_generic_env(tmp_dir, manager):
1079
1083
venv ._bin_dir .joinpath (expected_pip_executable ).unlink ()
1080
1084
expected_pip_executable = default_pip_executable
1081
1085
1086
+ if not venv ._bin_dir .joinpath (expected_executable ).exists ():
1087
+ expected_pip_executable = default_executable
1088
+
1089
+ if not venv ._bin_dir .joinpath (expected_pip_executable ).exists ():
1090
+ expected_pip_executable = default_pip_executable
1091
+
1082
1092
venv = GenericEnv (parent_venv .path , child_env = VirtualEnv (child_venv_path ))
1083
1093
1084
1094
assert Path (venv .python ).name == expected_executable
0 commit comments