Skip to content

Commit

Permalink
Merge remote-tracking branch 'jxltom/add-tests-for-ref-with-@-support…
Browse files Browse the repository at this point in the history
…' into merge-prs

- Closes #2939
  • Loading branch information
techalchemy committed Oct 30, 2018
2 parents 1077962 + 6f9601f commit b38a1da
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions tests/integration/test_lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b38a1da

Please sign in to comment.