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

Check Path in confcudir parent hierarchy #9779

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions extra/setup-py.test/setup.py
@@ -1,4 +1,5 @@
import sys

from distutils.core import setup

if __name__ == "__main__":
Expand Down
6 changes: 1 addition & 5 deletions src/_pytest/config/__init__.py
Expand Up @@ -538,11 +538,7 @@ def _is_in_confcutdir(self, path: Path) -> bool:
"""
if self._confcutdir is None:
return True
try:
path.relative_to(self._confcutdir)
except ValueError:
return False
return True
return path not in self._confcutdir.parents

def _try_load_conftest(
self, anchor: Path, importmode: Union[str, ImportMode], rootpath: Path
Expand Down