From f71167853737ac2f22166d5e9529e18ee92f9a7c Mon Sep 17 00:00:00 2001 From: Tzu-ping Chung Date: Fri, 13 Jul 2018 03:14:21 +0800 Subject: [PATCH] Get virtualenv location from output The Project class's implementation is a fucking mess. Avoid that. --- tests/integration/test_install_basic.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/integration/test_install_basic.py b/tests/integration/test_install_basic.py index e5a481278e..ab6648f42b 100644 --- a/tests/integration/test_install_basic.py +++ b/tests/integration/test_install_basic.py @@ -359,10 +359,16 @@ def test_install_venv_project_directory(PipenvInstance, pypi): os.environ["WORKON_HOME"] = workon_home.name if "PIPENV_VENV_IN_PROJECT" in os.environ: del os.environ["PIPENV_VENV_IN_PROJECT"] + c = p.pipenv("install six") assert c.return_code == 0 - project = Project() - assert Path(project.virtualenv_location).joinpath(".project").exists() + + venv_loc = None + for line in c.err.splitlines(): + if line.startswith("Virtualenv location:"): + venv_loc = Path(line.split(":", 1)[-1].strip()) + assert venv_loc is not None + assert venv_loc.joinpath(".project").exists() @pytest.mark.deploy