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

Function test_getstartingblock_singleline

testing/code/test_source.py:220–229  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

218
219
220def test_getstartingblock_singleline() -> None:
221 class A:
222 def __init__(self, *args) -> None:
223 frame = sys._getframe(1)
224 self.source = Frame(frame).statement
225
226 x = A("x", "y")
227
228 values = [i for i in x.source.lines if i.strip()]
229 assert len(values) == 1
230
231
232def test_getline_finally() -> None:

Callers

nothing calls this directly

Calls 2

stripMethod · 0.80
AClass · 0.70

Tested by

no test coverage detected