Merge pull request #8382 from uranusjr/constraint-tests-rewrite

Convert test_install_with_extras_from_install to not use URL constraint
This commit is contained in:
Paul Moore 2020-06-11 08:44:47 +01:00 committed by GitHub
commit 4c055378e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 6 deletions

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')