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