Run a test module in process using ``pytest.main()``. This run writes "source" into a temporary file and runs ``pytest.main()`` on it, returning a :py:class:`HookRecorder` instance for the result. :param source: The source code of the test module. :param cmd
(self, source: str, *cmdlineargs)
| 1062 | return runner(item) |
| 1063 | |
| 1064 | def inline_runsource(self, source: str, *cmdlineargs) -> HookRecorder: |
| 1065 | """Run a test module in process using ``pytest.main()``. |
| 1066 | |
| 1067 | This run writes "source" into a temporary file and runs |
| 1068 | ``pytest.main()`` on it, returning a :py:class:`HookRecorder` instance |
| 1069 | for the result. |
| 1070 | |
| 1071 | :param source: The source code of the test module. |
| 1072 | :param cmdlineargs: Any extra command line arguments to use. |
| 1073 | """ |
| 1074 | p = self.makepyfile(source) |
| 1075 | values = [*list(cmdlineargs), p] |
| 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. |
no test coverage detected