(self, pytester: Pytester)
| 1138 | |
| 1139 | class TestReportInfo: |
| 1140 | def test_itemreport_reportinfo(self, pytester: Pytester) -> None: |
| 1141 | pytester.makeconftest( |
| 1142 | """ |
| 1143 | import pytest |
| 1144 | class MyFunction(pytest.Function): |
| 1145 | def reportinfo(self): |
| 1146 | return "ABCDE", 42, "custom" |
| 1147 | def pytest_pycollect_makeitem(collector, name, obj): |
| 1148 | if name == "test_func": |
| 1149 | return MyFunction.from_parent(name=name, parent=collector) |
| 1150 | """ |
| 1151 | ) |
| 1152 | item = pytester.getitem("def test_func(): pass") |
| 1153 | item.config.pluginmanager.getplugin("runner") |
| 1154 | assert item.location == ("ABCDE", 42, "custom") |
| 1155 | |
| 1156 | def test_func_reportinfo(self, pytester: Pytester) -> None: |
| 1157 | item = pytester.getitem("def test_func(): pass") |
nothing calls this directly
no test coverage detected