MCPcopy Create free account
hub / github.com/pytest-dev/pytest / _recurse

Method _recurse

src/_pytest/python.py:692–702  ·  view source on GitHub ↗
(self, direntry: "os.DirEntry[str]")

Source from the content-addressed store, hash-verified

690 return self.session.isinitpath(path)
691
692 def _recurse(self, direntry: "os.DirEntry[str]") -> bool:
693 if direntry.name == "__pycache__":
694 return False
695 fspath = Path(direntry.path)
696 ihook = self.session.gethookproxy(fspath.parent)
697 if ihook.pytest_ignore_collect(collection_path=fspath, config=self.config):
698 return False
699 norecursepatterns = self.config.getini("norecursedirs")
700 if any(fnmatch_ex(pat, fspath) for pat in norecursepatterns):
701 return False
702 return True
703
704 def _collectfile(
705 self, fspath: Path, handle_dupes: bool = True

Callers

nothing calls this directly

Calls 3

fnmatch_exFunction · 0.90
gethookproxyMethod · 0.45
getiniMethod · 0.45

Tested by

no test coverage detected