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

Function test_frame_getsourcelineno_myself

testing/code/test_code.py:57–64  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

55
56
57def test_frame_getsourcelineno_myself() -> None:
58 def func() -> FrameType:
59 return sys._getframe(0)
60
61 f = Frame(func())
62 source, lineno = f.code.fullsource, f.lineno
63 assert source is not None
64 assert source[lineno].startswith(" return sys._getframe(0)")
65
66
67def test_getstatement_empty_fullsource() -> None:

Callers

nothing calls this directly

Calls 2

FrameClass · 0.90
funcFunction · 0.70

Tested by

no test coverage detected