Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pipfile creation with unnamed project #3264

Merged
merged 4 commits into from
Nov 20, 2018
Merged

Fix pipfile creation with unnamed project #3264

merged 4 commits into from
Nov 20, 2018

Conversation

techalchemy
Copy link
Member

Fix pipfile creation with unnamed project

- Fixes #3260

Signed-off-by: Dan Ryan <dan@danryan.co>
Signed-off-by: Dan Ryan <dan@danryan.co>
Signed-off-by: Dan Ryan <dan@danryan.co>
@techalchemy
Copy link
Member Author

The new test does fail when run against master in the expected way:

________________________________________________________________________________ test_install_creates_pipfile ________________________________________________________________________________
[gw0] linux -- Python 3.7.1 /home/hawk/.virtualenvs/pipenv-MfOPs1lW/bin/python

PipenvInstance = <class 'tests.integration.conftest._PipenvInstance'>

    @pytest.mark.install
    def test_install_creates_pipfile(PipenvInstance):
        with PipenvInstance(chdir=True) as p:
            if os.path.isfile(p.pipfile_path):
                os.unlink(p.pipfile_path)
            if "PIPENV_PIPFILE" in os.environ:
                del os.environ["PIPENV_PIPFILE"]
            assert not os.path.isfile(p.pipfile_path)
            c = p.pipenv("install")
>           assert c.return_code == 0
E           AssertionError: assert 1 == 0
E            +  where 1 = <Command 'pipenv install'>.return_code

tests/integration/test_install_basic.py:432: AssertionError
------------------------------------------------------------------------------------ Captured stdout call ------------------------------------------------------------------------------------
$ pipenv install

[pipenv.exceptions.PipfileNotFound]:   File "/home/hawk/git/pipenv/pipenv/vendor/click/decorators.py", line 64, in new_func
[pipenv.exceptions.PipfileNotFound]:       return ctx.invoke(f, obj, *args, **kwargs)
[pipenv.exceptions.PipfileNotFound]:   File "/home/hawk/git/pipenv/pipenv/vendor/click/core.py", line 555, in invoke
[pipenv.exceptions.PipfileNotFound]:       return callback(*args, **kwargs)
[pipenv.exceptions.PipfileNotFound]:   File "/home/hawk/git/pipenv/pipenv/vendor/click/decorators.py", line 17, in new_func
[pipenv.exceptions.PipfileNotFound]:       return f(get_current_context(), *args, **kwargs)
[pipenv.exceptions.PipfileNotFound]:   File "/home/hawk/git/pipenv/pipenv/cli/command.py", line 250, in install
[pipenv.exceptions.PipfileNotFound]:       editable_packages=state.installstate.editables,
[pipenv.exceptions.PipfileNotFound]:   File "/home/hawk/git/pipenv/pipenv/core.py", line 1718, in do_install
[pipenv.exceptions.PipfileNotFound]:       raise exceptions.PipfileNotFound(project.path_to("Pipfile"))
ERROR: /tmp/pipenv-8urp4wrr-project/Pipfile not found! Aborting! Please ensure that the file exists and is located in your project root directory.

Command failed...
===Flaky Test Report===

@frostming
Copy link
Contributor

LGTM🍰

@techalchemy techalchemy merged commit 558d67c into master Nov 20, 2018
@techalchemy techalchemy deleted the bugfix/3260 branch November 20, 2018 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants