1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00

Convert test_install_with_extras_from_install

This commit is contained in:
Tzu-ping Chung 2020-06-02 23:03:33 +08:00 committed by Paul Moore
parent 57b39a85bc
commit b372132cac

View file

@ -5,6 +5,7 @@ import pytest
from tests.lib import (
_create_test_package_with_subdirectory,
create_basic_wheel_for_package,
need_svn,
path_to_url,
pyversion,
@ -412,14 +413,19 @@ def test_install_with_extras_from_constraints(script, data):
result.did_create(script.site_packages / 'simple')
@pytest.mark.fails_on_new_resolver
def test_install_with_extras_from_install(script, data):
to_install = data.packages.joinpath("LocalExtras")
script.scratch_path.joinpath("constraints.txt").write_text(
"{url}#egg=LocalExtras".format(url=path_to_url(to_install))
def test_install_with_extras_from_install(script):
create_basic_wheel_for_package(
script,
name="LocalExtras",
version="0.0.1",
extras={"bar": "simple", "baz": ["singlemodule"]},
)
script.scratch_path.joinpath("constraints.txt").write_text("LocalExtras")
result = script.pip_install_local(
'-c', script.scratch_path / 'constraints.txt', 'LocalExtras[baz]')
'--find-links', script.scratch_path,
'-c', script.scratch_path / 'constraints.txt',
'LocalExtras[baz]',
)
result.did_create(script.site_packages / 'singlemodule.py')