File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -2427,6 +2427,30 @@ def test_new_resolver_constraint_on_link_with_extra(
2427
2427
script .assert_installed (pkg = "1.0" )
2428
2428
2429
2429
2430
+ def test_new_resolver_constraint_on_link_with_extra_indirect (
2431
+ script : PipTestEnvironment ,
2432
+ ) -> None :
2433
+ """
2434
+ Verify that installing works from a link with an extra if there is an indirect
2435
+ dependency on that same package with the same extra (#12372).
2436
+ """
2437
+ wheel_one : pathlib .Path = create_basic_wheel_for_package (
2438
+ script , "pkg1" , "1.0" , extras = {"ext" : []}
2439
+ )
2440
+ wheel_two : pathlib .Path = create_basic_wheel_for_package (
2441
+ script , "pkg2" , "1.0" , depends = ["pkg1[ext]==1.0" ]
2442
+ )
2443
+
2444
+ script .pip (
2445
+ "install" ,
2446
+ "--no-cache-dir" ,
2447
+ # no index, no --find-links: only the explicit path
2448
+ wheel_two ,
2449
+ f"{ wheel_one } [ext]" ,
2450
+ )
2451
+ script .assert_installed (pkg1 = "1.0" , pkg2 = "1.0" )
2452
+
2453
+
2430
2454
def test_new_resolver_do_not_backtrack_on_build_failure (
2431
2455
script : PipTestEnvironment ,
2432
2456
) -> None :
You can’t perform that action at this time.
0 commit comments