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

Function test_getstatement_empty_fullsource

testing/code/test_code.py:70–76  ·  testing/code/test_code.py::test_getstatement_empty_fullsource
()

Source from the content-addressed store, hash-verified

68
69
70def test_getstatement_empty_fullsource() -> None:
71 def func() -> FrameType:
72 return sys._getframe(0)
73
74 f = Frame(func())
75 with mock.patch.object(f.code.__class__, class="st">"fullsource", None):
76 assert f.statement == Source(class="st">"")
77
78
79def test_code_from_func() -> None:

Callers

nothing calls this directly

Calls 3

FrameClass · 0.90
SourceClass · 0.90
funcFunction · 0.70

Tested by

no test coverage detected