Skip to content

Commit

Permalink
Add test to verify pipenv update
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Ryan <[email protected]>
  • Loading branch information
techalchemy committed Jun 18, 2018
1 parent ac853d0 commit 1c04960
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/integration/test_pipenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,24 @@ def test_deploy_works(PipenvInstance, pypi):

c = p.pipenv('install --deploy')
assert c.return_code > 0


@pytest.mark.update
@pytest.mark.lock
def test_update_locks(PipenvInstance, pypi):

with PipenvInstance(pypi=pypi) as p:
c = p.pipenv('install requests==2.14.0')
assert c.return_code == 0
with open(p.pipfile_path, 'r') as fh:
pipfile_contents = fh.read()
pipfile_contents = pipfile_contents.replace('==2.14.0', '*')
with open(p.pipfile_path, 'w') as fh:
fh.write(pipfile_contents)
c = p.pipenv('update requests')
assert c.return_code == 0
assert p.lockfile['default']['requests']['version'] == '==2.18.4'
c = p.pipenv('run pip freeze')
assert c.return_code == 0
lines = c.out.splitlines()
assert 'requests==2.18.4' in [l.strip() for l in lines]

0 comments on commit 1c04960

Please sign in to comment.