'Run ``pytest.main([\'--collectonly\'])`` in-process.
Returns a tuple of the collected items and a
:py:class:`HookRecorder` instance.
This runs the :py:func:`pytest.main` function to run all of
pytest inside the test process itself like
:py:meth:`inline_run`.  However the return value is a tuple of
the collection items and a :py:class:`HookRecorder` instance.'

def inline_genitems(self, *args):

    rec = self.inline_run('--collect-only', *args)
    items = [x.item for x in rec.getcalls('pytest_itemcollected')]
    return (items, rec)
