mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 06:46:15 +00:00
Apply patch for install_search_all_sources = True (#5895)
* Apply patch for install_search_all_sources = True * patch the patch * Add news fragment * add back test of install_search_all_sources
This commit is contained in:
@@ -139,8 +139,8 @@ six = "*"
|
||||
@pytest.mark.install
|
||||
@pytest.mark.needs_internet
|
||||
@pytest.mark.skipif(sys.version_info >= (3, 12), reason="Package does not work with Python 3.12")
|
||||
def test_install_specifying_index_url(pipenv_instance_pypi):
|
||||
with pipenv_instance_pypi() as p:
|
||||
def test_install_specifying_index_url(pipenv_instance_private_pypi):
|
||||
with pipenv_instance_private_pypi() as p:
|
||||
with open(p.pipfile_path, "w") as f:
|
||||
contents = """
|
||||
[[source]]
|
||||
@@ -153,6 +153,8 @@ six = "*"
|
||||
|
||||
[dev-packages]
|
||||
|
||||
[pipenv]
|
||||
install_search_all_sources = true
|
||||
""".strip()
|
||||
f.write(contents)
|
||||
c = p.pipenv("install pipenv-test-private-package --index https://test.pypi.org/simple")
|
||||
|
||||
@@ -646,3 +646,31 @@ dataclasses-json = {extras = ["dev"], version = "==0.5.7"}
|
||||
assert "dataclasses-json" in p.pipfile["packages"]
|
||||
assert "dataclasses-json" in p.lockfile["default"]
|
||||
assert p.lockfile["default"]["dataclasses-json"].get("markers", "") is not None
|
||||
|
||||
@pytest.mark.index
|
||||
@pytest.mark.install # private indexes need to be uncached for resolution
|
||||
@pytest.mark.skip_lock
|
||||
@pytest.mark.needs_internet
|
||||
def test_private_index_skip_lock(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"}
|
||||
|
||||
[pipenv]
|
||||
install_search_all_sources = true
|
||||
""".strip()
|
||||
f.write(contents)
|
||||
c = p.pipenv('install --skip-lock')
|
||||
assert c.returncode == 0
|
||||
|
||||
Reference in New Issue
Block a user