fixed a bug with locking packages with uncanonical names

This commit is contained in:
Aleksandr Mangin
2024-01-05 14:07:39 +01:00
committed by Oz Tiram
parent 8e0608593a
commit dc261212c8
3 changed files with 30 additions and 1 deletions
+27
View File
@@ -285,6 +285,33 @@ pipenv-test-private-package = {version = "*", index = "testpypi"}
assert c.returncode == 0
@pytest.mark.lock
@pytest.mark.index
@pytest.mark.install # private indexes need to be uncached for resolution
@pytest.mark.requirements
@pytest.mark.needs_internet
def test_private_index_lock_requirements_for_not_canonical_package(pipenv_instance_private_pypi):
with pipenv_instance_private_pypi() as p:
with open(p.pipfile_path, 'w') as f:
contents = """
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[[source]]
url = "https://test.pypi.org/simple"
verify_ssl = true
name = "testpypi"
[packages]
pipenv_test_private_package = {version = "*", index = "testpypi"}
""".strip()
f.write(contents)
c = p.pipenv('lock')
assert c.returncode == 0
@pytest.mark.index
@pytest.mark.install
def test_lock_updated_source(pipenv_instance_private_pypi):