Skip to content

Commit

Permalink
Fix tests for real
Browse files Browse the repository at this point in the history
  • Loading branch information
techalchemy committed Nov 20, 2017
1 parent 847bfb6 commit a6e021b
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions tests/test_pipenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -598,16 +598,14 @@ def test_shell_nested_venv_in_project(self):
@pytest.mark.run
@pytest.mark.dotenv
def test_env(self):
with PipenvInstance(pipfile=False) as p:
p.pipenv('install')
with open('.env', 'w') as f:
f.write('HELLO=WORLD')

with temp_environ():
os.environ['PIPENV_USE_SYSTEM'] = '1'
with PipenvInstance(pipfile=True) as p:
with open('.env', 'w') as f:
f.write('HELLO=WORLD')

c = p.pipenv('run python -c "import os; print(os.environ[\'HELLO\'])"')
assert c.return_code == 0
assert 'WORLD' in c.out
c = p.pipenv('run python -c "import os; print(os.environ[\'HELLO\'])"')
assert c.return_code == 0
assert 'WORLD' in c.out

@pytest.mark.run
@pytest.mark.cli
Expand Down

0 comments on commit a6e021b

Please sign in to comment.