Fix pipfile creation with unnamed project

- Fixes #3260

Signed-off-by: Dan Ryan <dan@danryan.co>
This commit is contained in:
Dan Ryan
2018-11-20 11:00:53 -05:00
parent 206a59c838
commit f99de85ef7
3 changed files with 10 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
Fixed an issue which sometimes prevented successful creation of project pipfiles.
+1
View File
@@ -693,6 +693,7 @@ class Project(object):
ConfigOptionParser, make_option_group, index_group
)
name = self.name if self.name is not None else "Pipfile"
config_parser = ConfigOptionParser(name=self.name)
config_parser.add_option_group(make_option_group(index_group, config_parser))
install = config_parser.option_groups[0]
+8
View File
@@ -418,3 +418,11 @@ requests
)
c = p.pipenv("install --system")
assert c.return_code == 0
@pytest.mark.install
def test_install_creates_pipfile(PipenvInstance):
with PipenvInstance(chdir=True) as p:
c = p.pipenv("install")
assert c.return_code == 0
assert os.path.isfile(p.pipfile_path)