Skip to content

Commit

Permalink
Fix casing test on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
uranusjr committed Jul 4, 2018
1 parent fcbda18 commit 9adf3bd
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions tests/integration/test_windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,23 @@ def test_case_changes_windows(PipenvInstance, pypi):
c = p.pipenv('install pytz')
assert c.return_code == 0

virtualenv_location = Project().virtualenv_location
# Canonical venv location.
c = p.pipenv('--venv')
assert c.return_code == 0
virtualenv_location = c.out.strip()

# Dance around to change the casing of the project directory.
target = p.path.upper()
if target == p.path:
target = p.path.lower()
os.chdir('..')
os.chdir(target)
assert os.path.abspath(os.curdir) != p.path

venv = p.pipenv('--venv').out
assert venv.strip().lower() == virtualenv_location.lower()
# Ensure the incorrectly-cased project can find the correct venv.
c = p.pipenv('--venv')
assert c.return_code == 0
assert c.out.strip().lower() == virtualenv_location.lower()


@pytest.mark.files
Expand Down

0 comments on commit 9adf3bd

Please sign in to comment.