MCPcopy
hub / github.com/pytest-dev/pytest / _check_initialpaths_for_relpath

Function _check_initialpaths_for_relpath

src/_pytest/nodes.py:539–549  ·  view source on GitHub ↗
(
    initial_paths: frozenset[Path], path: Path
)

Source from the content-addressed store, hash-verified

537
538@lru_cache(maxsize=1000)
539def _check_initialpaths_for_relpath(
540 initial_paths: frozenset[Path], path: Path
541) -> str | None:
542 if path in initial_paths:
543 return ""
544
545 for parent in path.parents:
546 if parent in initial_paths:
547 return str(path.relative_to(parent))
548
549 return None
550
551
552class FSCollector(Collector, abc.ABC):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected