Check Path in confcudir parent hierarchy
Fixes: #9767 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
f0bf4c9681
commit
1f2a70d586
|
@ -538,11 +538,7 @@ class PytestPluginManager(PluginManager):
|
||||||
"""
|
"""
|
||||||
if self._confcutdir is None:
|
if self._confcutdir is None:
|
||||||
return True
|
return True
|
||||||
try:
|
return path not in self._confcutdir.parents
|
||||||
path.relative_to(self._confcutdir)
|
|
||||||
except ValueError:
|
|
||||||
return False
|
|
||||||
return True
|
|
||||||
|
|
||||||
def _try_load_conftest(
|
def _try_load_conftest(
|
||||||
self, anchor: Path, importmode: Union[str, ImportMode], rootpath: Path
|
self, anchor: Path, importmode: Union[str, ImportMode], rootpath: Path
|
||||||
|
|
Loading…
Reference in New Issue