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

Method test_func_reportinfo

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

Source from the content-addressed store, hash-verified

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")
1158 path, lineno, modpath = item.reportinfo()
1159 assert os.fspath(path) == str(item.path)
1160 assert lineno == 0
1161 assert modpath == "test_func"
1162
1163 def test_class_reportinfo(self, pytester: Pytester) -> None:
1164 modcol = pytester.getmodulecol(

Callers

nothing calls this directly

Calls 3

fspathMethod · 0.80
getitemMethod · 0.45
reportinfoMethod · 0.45

Tested by

no test coverage detected