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

Function test_code_source

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

Source from the content-addressed store, hash-verified

50
51
52def test_code_source() -> None:
53 code = Code.from_function(x)
54 src = code.source()
55 expected = """def x() -> None:
56 raise NotImplementedError()"""
57 assert str(src) == expected
58
59
60def test_frame_getsourcelineno_myself() -> None:

Callers

nothing calls this directly

Calls 2

from_functionMethod · 0.80
sourceMethod · 0.80

Tested by

no test coverage detected