Skip to content

Commit

Permalink
Add test for pipenv --python --site-packages
Browse files Browse the repository at this point in the history
  • Loading branch information
nonylene authored Dec 8, 2018
1 parent 0498b46 commit f81e861
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/integration/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,20 @@ def test_pipenv_py(PipenvInstance):
assert os.path.basename(python).startswith('python')


@pytest.mark.cli
def test_pipenv_site_packages(PipenvInstance):
with PipenvInstance() as p:
c = p.pipenv('--python python --site-packages')
assert c.return_code == 0
assert 'Making site-packages available' in c.err

# no-global-site-packages.txt under stdlib dir should not exist.
c = p.pipenv('run python -c "import sysconfig; print(sysconfig.get_path(\'stdlib\'))"')
assert c.return_code == 0
stdlib_path = c.out.strip()
assert not os.path.isfile(os.path.join(stdlib_path, 'no-global-site-packages.txt'))


@pytest.mark.cli
def test_pipenv_support(PipenvInstance):
with PipenvInstance() as p:
Expand Down

0 comments on commit f81e861

Please sign in to comment.