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

Function test_frame_getsourcelineno_myself

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

FrameClass · 0.90
funcFunction · 0.70

Tested by

no test coverage detected