mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
Merge pull request #3431 from pypa/bugfix/3427
Populate source when getting lockfile
This commit is contained in:
@@ -0,0 +1 @@
|
||||
Fix a bug that ``ValidationError`` is thrown when some fields are missing in source section.
|
||||
+1
-1
@@ -780,7 +780,7 @@ class Project(object):
|
||||
return {
|
||||
"hash": {"sha256": self.calculate_pipfile_hash()},
|
||||
"pipfile-spec": PIPFILE_SPEC_CURRENT,
|
||||
"sources": sources,
|
||||
"sources": [self.populate_source(s) for s in sources],
|
||||
"requires": self.parsed_pipfile.get("requires", {})
|
||||
}
|
||||
|
||||
|
||||
@@ -491,6 +491,7 @@ def test_lockfile_with_empty_dict(PipenvInstance):
|
||||
|
||||
|
||||
@pytest.mark.lock
|
||||
@pytest.mark.skip_lock
|
||||
@pytest.mark.install
|
||||
def test_lock_with_incomplete_source(PipenvInstance, pypi):
|
||||
with PipenvInstance(pypi=pypi, chdir=True) as p:
|
||||
@@ -502,6 +503,8 @@ url = "https://test.pypi.org/simple"
|
||||
[packages]
|
||||
requests = "*"
|
||||
""")
|
||||
c = p.pipenv('install --skip-lock')
|
||||
assert c.return_code == 0
|
||||
c = p.pipenv('install')
|
||||
assert c.return_code == 0
|
||||
assert p.lockfile['_meta']['sources']
|
||||
|
||||
Reference in New Issue
Block a user