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

Method from_parent

src/_pytest/main.py:550–562  ·  view source on GitHub ↗

The public constructor. :param parent: The parent collector of this Dir. :param path: The directory's path. :type path: pathlib.Path

(  # type: ignore[override]
        cls,
        parent: nodes.Collector,
        *,
        path: Path,
    )

Source from the content-addressed store, hash-verified

548
549 @classmethod
550 def from_parent( # type: ignore[override]
551 cls,
552 parent: nodes.Collector,
553 *,
554 path: Path,
555 ) -> Self:
556 """The public constructor.
557
558 :param parent: The parent collector of this Dir.
559 :param path: The directory's path.
560 :type path: pathlib.Path
561 """
562 return super().from_parent(parent=parent, path=path)
563
564 def collect(self) -> Iterable[nodes.Item | nodes.Collector]:
565 config = self.config

Callers 6

pytest_collect_directoryFunction · 0.45
collectMethod · 0.45
pytest_collect_fileFunction · 0.45
collectMethod · 0.45
pytest_collect_directoryFunction · 0.45

Calls

no outgoing calls

Tested by 5

collectMethod · 0.36
pytest_collect_fileFunction · 0.36
collectMethod · 0.36
pytest_collect_directoryFunction · 0.36