mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
Merge pull request #2516 from pypa/bugfix/test-on-windows
Fix casing test on Windows
This commit is contained in:
@@ -18,7 +18,12 @@ 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()
|
||||
@@ -26,8 +31,10 @@ def test_case_changes_windows(PipenvInstance, pypi):
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user