Skip to content

Commit c6a9490

Browse files
committed
Ensure we're not mishandling local indexes
Signed-off-by: Pradyun Gedam <[email protected]>
1 parent 7ce06dd commit c6a9490

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

tests/functional/test_new_resolver.py

+26
Original file line numberDiff line numberDiff line change
@@ -1172,3 +1172,29 @@ def test_new_resolver_does_reinstall_local_paths(script):
11721172
)
11731173
assert "Installing collected packages: pkg" in result.stdout, str(result)
11741174
assert_installed(script, pkg="1.0")
1175+
1176+
1177+
def test_new_resolver_does_not_reinstall_when_from_a_local_index(script):
1178+
create_basic_wheel_for_package(
1179+
script,
1180+
"simple",
1181+
"0.1.0",
1182+
)
1183+
script.pip(
1184+
"install",
1185+
"--no-cache-dir", "--no-index",
1186+
"--find-links", script.scratch_path,
1187+
"simple"
1188+
)
1189+
assert_installed(script, simple="0.1.0")
1190+
1191+
result = script.pip(
1192+
"install",
1193+
"--no-cache-dir", "--no-index",
1194+
"--find-links", script.scratch_path,
1195+
"simple"
1196+
)
1197+
# Should not reinstall!
1198+
assert "Installing collected packages: simple" not in result.stdout, str(result)
1199+
assert "Requirement already satisfied: simple" in result.stdout, str(result)
1200+
assert_installed(script, simple="0.1.0")

0 commit comments

Comments
 (0)