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

Method inline_genitems

src/_pytest/pytester.py:1043–1052  ·  view source on GitHub ↗

Run ``pytest.main(['--collectonly'])`` in-process. Runs the :py:func:`pytest.main` function to run all of pytest inside the test process itself like :py:meth:`inline_run`, but returns a tuple of the collected items and a :py:class:`HookRecorder` instance.

(self, *args)

Source from the content-addressed store, hash-verified

1041 return self.inline_run(*values)
1042
1043 def inline_genitems(self, *args) -> Tuple[List[Item], HookRecorder]:
1044 """Run ``pytest.main(['--collectonly'])`` in-process.
1045
1046 Runs the :py:func:`pytest.main` function to run all of pytest inside
1047 the test process itself like :py:meth:`inline_run`, but returns a
1048 tuple of the collected items and a :py:class:`HookRecorder` instance.
1049 """
1050 rec = self.inline_run("--collect-only", *args)
1051 items = [x.item for x in rec.getcalls("pytest_itemcollected")]
1052 return items, rec
1053
1054 def inline_run(
1055 self,

Calls 2

inline_runMethod · 0.95
getcallsMethod · 0.80

Tested by

no test coverage detected