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

Function test_code_source

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

Source from the content-addressed store, hash-verified

47
48
49def test_code_source() -> None:
50 code = Code.from_function(x)
51 src = code.source()
52 expected = """def x() -> None:
53 raise NotImplementedError()"""
54 assert str(src) == expected
55
56
57def 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