mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
Fix pipfile creation with unnamed project
- Fixes #3260 Signed-off-by: Dan Ryan <dan@danryan.co>
This commit is contained in:
@@ -0,0 +1 @@
|
||||
Fixed an issue which sometimes prevented successful creation of project pipfiles.
|
||||
@@ -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]
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user