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

Method from_parent

testing/test_collection.py:1620–1621  ·  view source on GitHub ↗
(cls, parent, *, name, x)

Source from the content-addressed store, hash-verified

1618
1619 @classmethod
1620 def from_parent(cls, parent, *, name, x): # type: ignore[override]
1621 return super().from_parent(parent=parent, name=name, x=x)
1622
1623 collector = MyCollector.from_parent(parent=request.session, name="foo", x=10)
1624 assert collector.x == 10

Callers 11

test_addmarker_orderFunction · 0.45
test_class_from_parentFunction · 0.45
make_functionMethod · 0.45
collectMethod · 0.45
pytest_collect_fileFunction · 0.45
collectMethod · 0.45
pytest_collect_fileFunction · 0.45
pytest_collect_directoryFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected