mirror of
https://github.com/davidhalter/parso.git
synced 2026-01-26 12:57:06 +08:00
Fix some stuff that caused issues in Jedi.
This commit is contained in:
@@ -184,3 +184,18 @@ def test_dedent_at_end():
|
||||
suite = module.children[0].children[-1]
|
||||
foobar = suite.children[-1]
|
||||
assert foobar.type == 'name'
|
||||
|
||||
|
||||
def test_no_error_nodes():
|
||||
def check(node):
|
||||
assert node.type not in ('error_leaf', 'error_node')
|
||||
|
||||
try:
|
||||
children = node.children
|
||||
except AttributeError:
|
||||
pass
|
||||
else:
|
||||
for child in children:
|
||||
check(child)
|
||||
|
||||
check(parse("if foo:\n bar"))
|
||||
|
||||
Reference in New Issue
Block a user