MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_itemreport_reportinfo

Method test_itemreport_reportinfo

testing/python/collect.py:1140–1154  ·  view source on GitHub ↗
(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

1138
1139class 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")

Callers

nothing calls this directly

Calls 3

getpluginMethod · 0.80
makeconftestMethod · 0.45
getitemMethod · 0.45

Tested by

no test coverage detected