'Return pytest.Item instances reported by the pytest_collectreport hook'

def get_reported_items(self, hookrec):

    calls = hookrec.getcalls('pytest_collectreport')
    return [x for call in calls for x in call.report.result if isinstance(x, pytest.Item)]
