module __file__ attribute is not the canonical path #11821
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
closes #11816
What
Undo #11708 and replace it will a more general fix of
anymodule.__file__
not having the right casing.This fails on Windows (python 3.8, pytest 8.0.0rc2):
This MR fixes it:
Test with the h5py CI that was broken by the issue: h5py/h5py#2368
Notes
realpath
,abspath
is not enough: module __file__ attribute is not the canonical path #11821 (comment)TestPytestPluginInteractions.test_conftestpath_case_sensitivity
is expected to change (https://github.com/pytest-dev/pytest/pull/11708/files#r1447814841) but this MR changes it in a way that was not intended (config.pluginmanager.get_plugin
returnsNone
when the string case is not the real path case)