From 07a51c6f3466433175c1476be534b22baa37679f Mon Sep 17 00:00:00 2001 From: jxltom Date: Sun, 16 Dec 2018 19:46:54 +0800 Subject: [PATCH] Test for pipenv behavior in activated virtualenv --- tests/integration/test_project.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/integration/test_project.py b/tests/integration/test_project.py index 6a4a858ae4..3a657e0cc6 100644 --- a/tests/integration/test_project.py +++ b/tests/integration/test_project.py @@ -170,7 +170,15 @@ def test_include_editable_packages(PipenvInstance, pypi, testsroot, pathlib_tmpd @pytest.mark.virtualenv def test_run_in_virtualenv(PipenvInstance, pypi, virtualenv): with PipenvInstance(chdir=True, pypi=pypi) as p: + os.environ['PIPENV_IGNORE_VIRTUALENVS'] = '1' + c = p.pipenv('run which pip') + assert c.return_code == 0 + assert 'pipenv' in c.out + os.environ.pop("PIPENV_IGNORE_VIRTUALENVS", None) + c = p.pipenv('run which pip') + assert c.return_code == 0 + assert 'virtualenv' in c.out project = Project() assert project.virtualenv_location == str(virtualenv) c = p.pipenv("run pip install click")