mirror of https://github.com/pypa/pip
Add failing test
This commit is contained in:
parent
396afb118e
commit
9b3cd280fd
|
@ -1132,3 +1132,46 @@ def test_new_resolver_check_wheel_version_normalized(
|
|||
"simple"
|
||||
)
|
||||
assert_installed(script, simple="0.1.0+local.1")
|
||||
|
||||
|
||||
def test_new_resolver_contraint_on_dep_with_extra(script):
|
||||
create_basic_wheel_for_package(
|
||||
script,
|
||||
name="simple",
|
||||
version="1",
|
||||
depends=["dep[x]"],
|
||||
)
|
||||
create_basic_wheel_for_package(
|
||||
script,
|
||||
name="dep",
|
||||
version="1",
|
||||
extras={"x": ["depx==1"]},
|
||||
)
|
||||
create_basic_wheel_for_package(
|
||||
script,
|
||||
name="dep",
|
||||
version="2",
|
||||
extras={"x": ["depx==2"]},
|
||||
)
|
||||
create_basic_wheel_for_package(
|
||||
script,
|
||||
name="depx",
|
||||
version="1",
|
||||
)
|
||||
create_basic_wheel_for_package(
|
||||
script,
|
||||
name="depx",
|
||||
version="2",
|
||||
)
|
||||
|
||||
constraints_txt = script.scratch_path / "constraints.txt"
|
||||
constraints_txt.write_text("dep==1")
|
||||
|
||||
script.pip(
|
||||
"install",
|
||||
"--no-cache-dir", "--no-index",
|
||||
"--find-links", script.scratch_path,
|
||||
"--constraint", constraints_txt,
|
||||
"simple",
|
||||
)
|
||||
assert_installed(script, simple="1", dep="1", depx="1")
|
||||
|
|
Loading…
Reference in New Issue