Return pytest.Item instances reported by the pytest_collectreport hook
(self, hookrec: HookRecorder)
| 483 | assert colitems[0].path == p |
| 484 | |
| 485 | def get_reported_items(self, hookrec: HookRecorder) -> List[Item]: |
| 486 | """Return pytest.Item instances reported by the pytest_collectreport hook""" |
| 487 | calls = hookrec.getcalls("pytest_collectreport") |
| 488 | return [ |
| 489 | x |
| 490 | for call in calls |
| 491 | for x in call.report.result |
| 492 | if isinstance(x, pytest.Item) |
| 493 | ] |
| 494 | |
| 495 | def test_collect_protocol_single_function(self, pytester: Pytester) -> None: |
| 496 | p = pytester.makepyfile("def test_func(): pass") |
no test coverage detected