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

Method getitems

src/_pytest/pytester.py:1247–1254  ·  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: Union[str, "os.PathLike[str]"])

Source from the content-addressed store, hash-verified

1245 )
1246
1247 def getitems(self, source: Union[str, "os.PathLike[str]"]) -> List[Item]:
1248 """Return all test items collected from the module.
1249
1250 Writes the source to a Python file and runs pytest's collection on
1251 the resulting module, returning all test items contained within.
1252 """
1253 modcol = self.getmodulecol(source)
1254 return self.genitems([modcol])
1255
1256 def getmodulecol(
1257 self,

Calls 2

getmodulecolMethod · 0.95
genitemsMethod · 0.95

Tested by

no test coverage detected