Test causing a change of candidate in locking iteration.

This commit is contained in:
Vincent Philippon
2017-11-13 23:16:06 -05:00
parent 7603783d8f
commit 8b7af50d33
+23
View File
@@ -1,4 +1,5 @@
import os
from pkg_resources import parse_version
import re
import tempfile
import shutil
@@ -820,6 +821,28 @@ maya = "*"
c = p.pipenv('install')
assert c.return_code == 0
@pytest.mark.lock
@pytest.mark.requirements
@pytest.mark.complex
def test_complex_lock_changing_candidate(self):
# The requests candidate will change from latest to <2.12.
with PipenvInstance() as p:
with open(p.pipfile_path, 'w') as f:
contents = """
[packages]
"docker-compose" = "==1.16.0"
requests = "*"
""".strip()
f.write(contents)
c = p.pipenv('lock')
assert c.return_code == 0
assert parse_version(p.lockfile['default']['requests']['version'][2:]) < parse_version('2.12')
c = p.pipenv('install')
assert c.return_code == 0
@pytest.mark.lock
@pytest.mark.deploy
def test_deploy_works(self):