From d1c5ec61889b58658ce01b0254a05e50bfa4122f Mon Sep 17 00:00:00 2001 From: Jacob Hayes Date: Tue, 10 Jul 2018 20:41:34 -0500 Subject: [PATCH] [#2504] Add test for VCS dep with extras --- tests/integration/test_lock.py | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/tests/integration/test_lock.py b/tests/integration/test_lock.py index 1ab34f1b92..eebfaf39e6 100644 --- a/tests/integration/test_lock.py +++ b/tests/integration/test_lock.py @@ -1,6 +1,5 @@ import pytest import os -import six from pipenv.utils import temp_environ @@ -348,6 +347,28 @@ def test_lock_editable_vcs_without_install(PipenvInstance, pypi): assert c.return_code == 0 +@pytest.mark.extras +@pytest.mark.lock +@pytest.mark.vcs +@pytest.mark.needs_internet +def test_lock_editable_vcs_with_extras_without_install(PipenvInstance, pypi): + with PipenvInstance(pypi=pypi, chdir=True) as p: + with open(p.pipfile_path, 'w') as f: + f.write(""" +[packages] +requests = {git = "https://github.com/requests/requests.git", editable = true, extras = ["security"]} + """.strip()) + c = p.pipenv('lock') + assert c.return_code == 0 + assert 'requests' in p.lockfile['default'] + assert 'idna' in p.lockfile['default'] + assert 'chardet' in p.lockfile['default'] + assert 'cryptography' in p.lockfile['default'] + assert 'pyOpenSSL' in p.lockfile['default'] + c = p.pipenv('install') + assert c.return_code == 0 + + @pytest.mark.lock @pytest.mark.skip(reason="This doesn't work for some reason.") def test_lock_respecting_python_version(PipenvInstance, pypi):