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

Method from_parent

src/_pytest/doctest.py:264–274  ·  view source on GitHub ↗

The public named constructor.

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

Source from the content-addressed store, hash-verified

262
263 @classmethod
264 def from_parent( # type: ignore
265 cls,
266 parent: "Union[DoctestTextfile, DoctestModule]",
267 *,
268 name: str,
269 runner: "doctest.DocTestRunner",
270 dtest: "doctest.DocTest",
271 ):
272 # incompatible signature due to imposed limits on subclass
273 """The public named constructor."""
274 return super().from_parent(name=name, parent=parent, runner=runner, dtest=dtest)
275
276 def setup(self) -> None:
277 if self.dtest is not None:

Callers 3

pytest_collect_fileFunction · 0.45
collectMethod · 0.45
collectMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected