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

Function test_container_assignment

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

Source from the content-addressed store, hash-verified

179
180
181def test_container_assignment() -> None:
182 source = (
183 'l = [] #: list\n'
184 'l[1] = True #: list assignment\n'
185 'l[0:0] = [] #: list assignment\n'
186 'l[_from:_to] = [] #: list assignment\n'
187 'd = {} #: dict\n'
188 'd["doc"] = 1 #: dict assignment\n'
189 )
190 parser = Parser(source)
191 parser.parse()
192 assert parser.comments == {('', 'l'): 'list', ('', 'd'): 'dict'}
193 assert parser.definitions == {}
194
195
196def test_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…