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

Function _check_initialpaths_for_relpath

src/_pytest/nodes.py:560–565  ·  view source on GitHub ↗
(session: "Session", path: Path)

Source from the content-addressed store, hash-verified

558
559
560def _check_initialpaths_for_relpath(session: "Session", path: Path) -> Optional[str]:
561 for initial_path in session._initialpaths:
562 if commonpath(path, initial_path) == initial_path:
563 rel = str(path.relative_to(initial_path))
564 return "" if rel == "." else rel
565 return None
566
567
568class FSCollector(Collector):

Callers 1

__init__Method · 0.85

Calls 1

commonpathFunction · 0.90

Tested by

no test coverage detected