mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
92cc570588
All tests are intact. I only move them around. PipenvInstance is turned into a fixture to be used across files. needs_internet is turned into a marker to be used across files.
28 lines
786 B
Python
28 lines
786 B
Python
import os
|
|
|
|
import pytest
|
|
|
|
|
|
# This module is run only on Windows.
|
|
pytestmark = pytest.mark.skipif(os.name == 'nt', reason="only relevant on windows")
|
|
|
|
|
|
@pytest.mark.project
|
|
def test_case_changes_windows(PipenvInstance, pypi, project):
|
|
"""Test project matching for case changes on Windows.
|
|
"""
|
|
with PipenvInstance(pypi=pypi, chdir=True) as p:
|
|
c = p.pipenv('install pytz')
|
|
assert c.return_code == 0
|
|
|
|
virtualenv_location = project.virtualenv_location
|
|
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()
|