Allow the use of many sources instead of just 2

- Fixes #2130

Signed-off-by: Dan Ryan <dan@danryan.co>
This commit is contained in:
Dan Ryan
2018-05-05 16:05:29 -04:00
parent cc6170e46b
commit da29453b62
3 changed files with 59 additions and 20 deletions
+32
View File
@@ -111,3 +111,35 @@ def test_maintain_file_line_endings(PipenvInstance, pypi, newlines):
actual_newlines, newlines, fn,
)
# message because of https://github.com/pytest-dev/pytest/issues/3443
@pytest.mark.project
@pytest.mark.sources
def test_many_indexes(PipenvInstance, pypi):
with PipenvInstance(pypi=pypi, chdir=True) as p:
with open(p.pipfile_path, 'w') as f:
contents = """
[[source]]
url = "{0}"
verify_ssl = false
name = "testindex"
[[source]]
url = "https://pypi.org/simple"
verify_ssl = "true"
name = "pypi"
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = "true"
name = "legacy"
[packages]
pytz = "*"
six = {{version = "*", index = "pypi"}}
[dev-packages]
""".format(os.environ['PIPENV_TEST_INDEX']).strip()
f.write(contents)
c = p.pipenv('install')
assert c.return_code == 0