(self, pytester: Pytester)
| 1252 | |
| 1253 | class TestReportInfo: |
| 1254 | def test_itemreport_reportinfo(self, pytester: Pytester) -> None: |
| 1255 | pytester.makeconftest( |
| 1256 | class="st">""" |
| 1257 | import pytest |
| 1258 | class MyFunction(pytest.Function): |
| 1259 | def reportinfo(self): |
| 1260 | return class="st">"ABCDE", 42, class="st">"custom" |
| 1261 | def pytest_pycollect_makeitem(collector, name, obj): |
| 1262 | if name == class="st">"test_func": |
| 1263 | return MyFunction.from_parent(name=name, parent=collector) |
| 1264 | class="st">""" |
| 1265 | ) |
| 1266 | item = pytester.getitem(class="st">"def test_func(): pass") |
| 1267 | item.config.pluginmanager.getplugin(class="st">"runner") |
| 1268 | assert item.location == (class="st">"ABCDE", 42, class="st">"custom") |
| 1269 | |
| 1270 | def test_func_reportinfo(self, pytester: Pytester) -> None: |
| 1271 | item = pytester.getitem(class="st">"def test_func(): pass") |
nothing calls this directly
no test coverage detected