File tree 1 file changed +26
-0
lines changed
1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -1172,3 +1172,29 @@ def test_new_resolver_does_reinstall_local_paths(script):
1172
1172
)
1173
1173
assert "Installing collected packages: pkg" in result .stdout , str (result )
1174
1174
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" )
You can’t perform that action at this time.
0 commit comments