Skip to content

Commit 4513b9c

Browse files
sanderrsbidoul
authored andcommitted
added second test case
1 parent 69b5810 commit 4513b9c

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

tests/functional/test_new_resolver.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2427,6 +2427,30 @@ def test_new_resolver_constraint_on_link_with_extra(
24272427
script.assert_installed(pkg="1.0")
24282428

24292429

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+
24302454
def test_new_resolver_do_not_backtrack_on_build_failure(
24312455
script: PipTestEnvironment,
24322456
) -> None:

0 commit comments

Comments
 (0)