diff --git a/tests/integration/test_lock.py b/tests/integration/test_lock.py index 7743804df0..2b520808e0 100644 --- a/tests/integration/test_lock.py +++ b/tests/integration/test_lock.py @@ -369,6 +369,42 @@ def test_lock_editable_vcs_without_install(PipenvInstance, pypi): assert c.return_code == 0 +@pytest.mark.lock +@pytest.mark.vcs +@pytest.mark.needs_internet +def test_lock_editable_vcs_with_ref_in_git(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@883caaf", editable = true} + """.strip()) + c = p.pipenv('lock') + assert c.return_code == 0 + assert p.lockfile['default']['requests']['git'] == 'https://github.com/requests/requests.git' + assert p.lockfile['default']['requests']['ref'] == '883caaf145fbe93bd0d208a6b864de9146087312' + c = p.pipenv('install') + assert c.return_code == 0 + + +@pytest.mark.lock +@pytest.mark.vcs +@pytest.mark.needs_internet +def test_lock_editable_vcs_with_ref(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", ref = "883caaf", editable = true} + """.strip()) + c = p.pipenv('lock') + assert c.return_code == 0 + assert p.lockfile['default']['requests']['git'] == 'https://github.com/requests/requests.git' + assert p.lockfile['default']['requests']['ref'] == '883caaf145fbe93bd0d208a6b864de9146087312' + c = p.pipenv('install') + assert c.return_code == 0 + + @pytest.mark.extras @pytest.mark.lock @pytest.mark.vcs