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

Method isinitpath

src/_pytest/main.py:528–531  ·  view source on GitHub ↗
(self, path: Union[str, "os.PathLike[str]"])

Source from the content-addressed store, hash-verified

526 pytest_collectreport = pytest_runtest_logreport
527
528 def isinitpath(self, path: Union[str, "os.PathLike[str]"]) -> bool:
529 # Optimization: Path(Path(...)) is much slower than isinstance.
530 path_ = path if isinstance(path, Path) else Path(path)
531 return path_ in self._initialpaths
532
533 def gethookproxy(self, fspath: "os.PathLike[str]"):
534 # Optimization: Path(Path(...)) is much slower than isinstance.

Callers 4

_collectfileMethod · 0.95
_is_doctestFunction · 0.45
_should_rewriteMethod · 0.45

Calls

no outgoing calls

Tested by 1

_is_doctestFunction · 0.36