From 4d41f918ac8a01e51b67494c3a66aab7b622ae7e Mon Sep 17 00:00:00 2001 From: Tzu-ping Chung Date: Thu, 15 Mar 2018 00:50:21 +0800 Subject: [PATCH] Better testing basic outputs --- tests/test_pipenv.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/test_pipenv.py b/tests/test_pipenv.py index 3dd77eee..5cb012c1 100644 --- a/tests/test_pipenv.py +++ b/tests/test_pipenv.py @@ -127,19 +127,22 @@ class TestPipenv: def test_pipenv_venv(self): with PipenvInstance() as p: p.pipenv('--python python') - assert p.pipenv('--venv').out + venv_path = p.pipenv('--venv').out.strip() + assert os.path.isdir(venv_path) @pytest.mark.cli def test_pipenv_py(self): with PipenvInstance() as p: p.pipenv('--python python') - assert p.pipenv('--py').out + python = p.pipenv('--py').out.strip() + assert os.path.basename(python).startswith('python') @pytest.mark.cli def test_pipenv_rm(self): with PipenvInstance() as p: p.pipenv('--python python') - venv_path = p.pipenv('--venv').out + venv_path = p.pipenv('--venv').out.strip() + assert os.path.isdir(venv_path) assert p.pipenv('--rm').out assert not os.path.isdir(venv_path)