Skip to content

Commit

Permalink
Test for pipenv behavior in activated virtualenv
Browse files Browse the repository at this point in the history
  • Loading branch information
jxltom committed Dec 16, 2018
1 parent ce14394 commit 07a51c6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/integration/test_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 07a51c6

Please sign in to comment.