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

Method genitems

src/_pytest/pytester.py:1002–1012  ·  view source on GitHub ↗

Generate all test items from a collection node. This recurses into the collection node and returns a list of all the test items contained within.

(self, colitems: Sequence[Union[Item, Collector]])

Source from the content-addressed store, hash-verified

1000 return res
1001
1002 def genitems(self, colitems: Sequence[Union[Item, Collector]]) -> List[Item]:
1003 """Generate all test items from a collection node.
1004
1005 This recurses into the collection node and returns a list of all the
1006 test items contained within.
1007 """
1008 session = colitems[0].session
1009 result: List[Item] = []
1010 for colitem in colitems:
1011 result.extend(session.genitems(colitem))
1012 return result
1013
1014 def runitem(self, source: str) -> Any:
1015 """Run the "test_func" Item.

Callers 1

getitemsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected