MCPcopy
hub / github.com/sphinx-doc/sphinx / test_function

Function test_function

tests/test_pycode/test_pycode_parser.py:196–208  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

194
195
196def test_function() -> None:
197 source = (
198 'def some_function():\n'
199 ' """docstring"""\n'
200 ' a = 1 + 1 #: comment1\n'
201 '\n'
202 ' b = a #: comment2\n'
203 )
204 parser = Parser(source)
205 parser.parse()
206 assert parser.comments == {}
207 assert parser.definitions == {'some_function': ('def', 1, 5)}
208 assert parser.deforders == {'some_function': 0}
209
210
211def test_nested_function() -> None:

Callers

nothing calls this directly

Calls 2

parseMethod · 0.95
ParserClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…