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

Method from_parent

src/_pytest/doctest.py:272–282  ·  view source on GitHub ↗

The public named constructor.

(  # type: ignore[override]
        cls,
        parent: DoctestTextfile | DoctestModule,
        *,
        name: str,
        runner: doctest.DocTestRunner,
        dtest: doctest.DocTest,
    )

Source from the content-addressed store, hash-verified

270
271 @classmethod
272 def from_parent( # type: ignore[override]
273 cls,
274 parent: DoctestTextfile | DoctestModule,
275 *,
276 name: str,
277 runner: doctest.DocTestRunner,
278 dtest: doctest.DocTest,
279 ) -> Self:
280 # incompatible signature due to imposed limits on subclass
281 """The public named constructor."""
282 return super().from_parent(name=name, parent=parent, runner=runner, dtest=dtest)
283
284 def _initrequest(self) -> None:
285 self.funcargs: dict[str, object] = {}

Callers 3

pytest_collect_fileFunction · 0.45
collectMethod · 0.45
collectMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected