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)
| 1027 | return runner(item) |
| 1028 | |
| 1029 | def inline_runsource(self, source: str, *cmdlineargs) -> HookRecorder: |
| 1030 | """Run a test module in process using ``pytest.main()``. |
| 1031 | |
| 1032 | This run writes "source" into a temporary file and runs |
| 1033 | ``pytest.main()`` on it, returning a :py:class:`HookRecorder` instance |
| 1034 | for the result. |
| 1035 | |
| 1036 | :param source: The source code of the test module. |
| 1037 | :param cmdlineargs: Any extra command line arguments to use. |
| 1038 | """ |
| 1039 | p = self.makepyfile(source) |
| 1040 | values = list(cmdlineargs) + [p] |
| 1041 | return self.inline_run(*values) |
| 1042 | |
| 1043 | def inline_genitems(self, *args) -> Tuple[List[Item], HookRecorder]: |
| 1044 | """Run ``pytest.main(['--collectonly'])`` in-process. |
no test coverage detected