MCPcopy Index your code
hub / github.com/pytest-dev/pytest / getitems

Method getitems

src/_pytest/pytester.py:1290–1297  ·  view source on GitHub ↗

Return all test items collected from the module. Writes the source to a Python file and runs pytest's collection on the resulting module, returning all test items contained within.

(self, source: str | os.PathLike[str])

Source from the content-addressed store, hash-verified

1288 assert 0, f"{funcname!r} item not found in module:\n{source}\nitems: {items}"
1289
1290 def getitems(self, source: str | os.PathLike[str]) -> list[Item]:
1291 """Return all test items collected from the module.
1292
1293 Writes the source to a Python file and runs pytest's collection on
1294 the resulting module, returning all test items contained within.
1295 """
1296 modcol = self.getmodulecol(source)
1297 return self.genitems([modcol])
1298
1299 def getmodulecol(
1300 self,

Calls 2

getmodulecolMethod · 0.95
genitemsMethod · 0.95

Tested by

no test coverage detected