MCPcopy
hub / github.com/pytest-dev/pytest / test_func_reportinfo

Method test_func_reportinfo

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

Source from the content-addressed store, hash-verified

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")
1272 path, lineno, modpath = item.reportinfo()
1273 assert os.fspath(path) == str(item.path)
1274 assert lineno == 0
1275 assert modpath == "test_func"
1276
1277 def test_class_reportinfo(self, pytester: Pytester) -> None:
1278 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