MCPcopy
hub / github.com/pytest-dev/pytest / inline_genitems

Method inline_genitems

src/_pytest/pytester.py:1078–1087  ·  view source on GitHub ↗

Run ``pytest.main(['--collect-only'])`` 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

1076 return self.inline_run(*values)
1077
1078 def inline_genitems(self, *args) -> tuple[list[Item], HookRecorder]:
1079 """Run ``pytest.main(['--collect-only'])`` in-process.
1080
1081 Runs the :py:func:`pytest.main` function to run all of pytest inside
1082 the test process itself like :py:meth:`inline_run`, but returns a
1083 tuple of the collected items and a :py:class:`HookRecorder` instance.
1084 """
1085 rec = self.inline_run("--collect-only", *args)
1086 items = [x.item for x in rec.getcalls("pytest_itemcollected")]
1087 return items, rec
1088
1089 def inline_run(
1090 self,

Calls 2

inline_runMethod · 0.95
getcallsMethod · 0.80

Tested by

no test coverage detected