From aa13648a1b3c101e1a2dfcb530f36f2b84fe5fc2 Mon Sep 17 00:00:00 2001 From: Dan Ryan Date: Sun, 19 Nov 2017 17:32:58 -0500 Subject: [PATCH] Test --system flag --- tests/test_pipenv.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/test_pipenv.py b/tests/test_pipenv.py index 280b1df0..9298609d 100644 --- a/tests/test_pipenv.py +++ b/tests/test_pipenv.py @@ -787,6 +787,24 @@ maya = "*" c = p.pipenv('install') assert c.return_code == 0 + @pytest.mark.lock + @pytest.mark.complex + def test_resolve_system_python_no_virtualenv(self): + with temp_environ(): + os.environ['PIPENV_IGNORE_VIRTUALENVS'] = '1' + os.environ['PIPENV_USE_SYSTEM'] = '1' + os.environ['PIP_PYTHON_PATH'] = '/bin/python' + with PipenvInstance() as p: + with open(p.pipfile_path, 'w') as f: + contents = """ +[packages] +tablib = "*" + """.strip() + f.write(contents) + c = p.pipenv('install --system') + assert c.return_code == 0 + + @pytest.mark.lock @pytest.mark.deploy def test_deploy_works(self):