Add test for isolated package lock.

This commit is contained in:
Matt Davis
2022-09-19 18:34:26 -04:00
parent 48a1c76039
commit eb6054ac0c
+23
View File
@@ -721,3 +721,26 @@ requests = "*"
assert "certifi" not in p.lockfile["develop"]
assert "urllib3" not in p.lockfile["develop"]
assert "chardet" not in p.lockfile["develop"]
@pytest.mark.lock
def test_lock_specific_named_category(pipenv_instance_private_pypi):
with pipenv_instance_private_pypi(chdir=True) as p:
contents = """
[[source]]
url = "{}"
verify_ssl = true
name = "test"
[packages]
requests = "*"
[prereq]
six = "*"
""".format(p.index_url).strip()
with open(p.pipfile_path, 'w') as f:
f.write(contents)
c = p.pipenv("lock --categories prereq")
assert c.returncode == 0
assert p.lockfile["prereq"]["six"]["index"] == "test"
assert p.lockfile["default"] == dict()