Run the "test_func" Item. The calling test instance (class containing the test method) must provide a ``.getrunner()`` method which should return a runner which can run the test protocol for a single item, e.g. ``_pytest.runner.runtestprotocol``.
(self, source: str)
| 1047 | return result |
| 1048 | |
| 1049 | def runitem(self, source: str) -> Any: |
| 1050 | """Run the "test_func" Item. |
| 1051 | |
| 1052 | The calling test instance (class containing the test method) must |
| 1053 | provide a ``.getrunner()`` method which should return a runner which |
| 1054 | can run the test protocol for a single item, e.g. |
| 1055 | ``_pytest.runner.runtestprotocol``. |
| 1056 | """ |
| 1057 | # used from runner functional tests |
| 1058 | item = self.getitem(source) |
| 1059 | # the test class where we are called from wants to provide the runner |
| 1060 | testclassinstance = self._request.instance |
| 1061 | runner = testclassinstance.getrunner() |
| 1062 | return runner(item) |
| 1063 | |
| 1064 | def inline_runsource(self, source: str, *cmdlineargs) -> HookRecorder: |
| 1065 | """Run a test module in process using ``pytest.main()``. |
no test coverage detected