Skip to content

Commit b966e13

Browse files
authored
Merge pull request #8482 from uranusjr/new-resolver-union-with-versions
Mark new resolver test failure on extra union
2 parents 92c7eeb + 9547793 commit b966e13

File tree

1 file changed

+25
-5
lines changed

1 file changed

+25
-5
lines changed

tests/functional/test_install_reqs.py

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -520,14 +520,34 @@ def test_install_distribution_union_with_constraints(
520520
result.did_create(script.site_packages / 'singlemodule.py')
521521

522522

523-
@pytest.mark.fails_on_new_resolver
524-
def test_install_distribution_union_with_versions(script, data):
523+
def test_install_distribution_union_with_versions(
524+
script,
525+
data,
526+
use_new_resolver,
527+
):
525528
to_install_001 = data.packages.joinpath("LocalExtras")
526529
to_install_002 = data.packages.joinpath("LocalExtras-0.0.2")
527530
result = script.pip_install_local(
528-
to_install_001 + "[bar]", to_install_002 + "[baz]")
529-
assert ("Successfully installed LocalExtras-0.0.1 simple-3.0 " +
530-
"singlemodule-0.0.1" in result.stdout)
531+
to_install_001 + "[bar]",
532+
to_install_002 + "[baz]",
533+
expect_error=use_new_resolver,
534+
)
535+
if use_new_resolver:
536+
assert (
537+
"Cannot install localextras[bar] 0.0.1 and localextras[baz] 0.0.2 "
538+
"because these package versions have conflicting dependencies."
539+
) in result.stderr
540+
assert (
541+
"localextras[bar] 0.0.1 depends on localextras 0.0.1"
542+
) in result.stdout
543+
assert (
544+
"localextras[baz] 0.0.2 depends on localextras 0.0.2"
545+
) in result.stdout
546+
else:
547+
assert (
548+
"Successfully installed LocalExtras-0.0.1 simple-3.0 "
549+
"singlemodule-0.0.1"
550+
) in result.stdout
531551

532552

533553
@pytest.mark.xfail

0 commit comments

Comments
 (0)