()
| 209 | |
| 210 | |
| 211 | def test_nested_function() -> None: |
| 212 | source = ( |
| 213 | 'def some_function():\n' |
| 214 | ' a = 1 + 1 #: comment1\n' |
| 215 | '\n' |
| 216 | ' def inner_function():\n' |
| 217 | ' b = 1 + 1 #: comment2\n' |
| 218 | ) |
| 219 | parser = Parser(source) |
| 220 | parser.parse() |
| 221 | assert parser.comments == {} |
| 222 | assert parser.definitions == {'some_function': ('def', 1, 5)} |
| 223 | assert parser.deforders == {'some_function': 0} |
| 224 | |
| 225 | |
| 226 | def test_class() -> None: |