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])
| 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, |
no test coverage detected