Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix regression due to different cases on Windows #5840

Merged
merged 4 commits into from
Sep 13, 2019

Conversation

nicoddemus
Copy link
Member

@nicoddemus nicoddemus commented Sep 12, 2019

This PR reverts #5792 to introduce a simpler fix: instead of changing all conftest paths to a unique representation, which unfortunately introduced #5819, it only uses a resolved Path object as key to the avoid importing conftest files more than once.

I would have taken the commits from #5823 (Sorry @Oberon00!), but unfortunately the fork seems to be gone, so I introduced the changes manually: a new test and the CHANGELOG.

Supersedes #5823.

@nicoddemus nicoddemus changed the title Fix regressions due to different cases on Windows Fix regression due to different cases on Windows Sep 12, 2019
testing/test_conftest.py Outdated Show resolved Hide resolved
Copy link
Contributor

@blueyed blueyed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 (after fixing the docstring)

nicoddemus and others added 4 commits September 12, 2019 08:05
…/bugfix/badcase"

This reverts commit 955e542, reversing
changes made to 0215bcd.

Will attempt a simpler approach
Using Path().resolve() is better than py.path.realpath because
it resolves to the correct path/drive in case-insensitive file systems (pytest-dev#5792):

>>> from py.path import local
>>> from pathlib import Path
>>>
>>> local('d:\\projects').realpath()
local('d:\\projects')
>>> Path('d:\\projects').resolve()
WindowsPath('D:/projects')

Fix pytest-dev#5819
The introduction was reverted by cd29d56
@atugushev
Copy link
Contributor

@nicoddemus thanks for fixing this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants