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

Function test_getstatement_empty_fullsource

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

Source from the content-addressed store, hash-verified

65
66
67def test_getstatement_empty_fullsource() -> None:
68 def func() -> FrameType:
69 return sys._getframe(0)
70
71 f = Frame(func())
72 with mock.patch.object(f.code.__class__, "fullsource", None):
73 assert f.statement == Source("")
74
75
76def 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