forked from VimPlug/jedi
Small changes.
This commit is contained in:
@@ -45,7 +45,7 @@ def suite_or_file_input_is_valid(parser):
|
||||
stack = parser.pgen_parser.stack
|
||||
for dfa, newstate, (symbol_number, nodes) in reversed(stack):
|
||||
if symbol_number == parser._grammar.symbol2number['suite']:
|
||||
# If we don't have ondes already, the suite is not valid.
|
||||
# If we don't have nodes already, the suite is not valid.
|
||||
return bool(nodes)
|
||||
# Not reaching a suite means that we're dealing with file_input levels
|
||||
# where there's no need for a valid statement in it. It can also be empty.
|
||||
|
||||
@@ -106,13 +106,13 @@ def test_positions(differ):
|
||||
assert m.end_pos == (1, 2)
|
||||
|
||||
|
||||
def test_if_simple():
|
||||
def test_if_simple(differ):
|
||||
src = dedent('''\
|
||||
if 1:
|
||||
a = 3
|
||||
''')
|
||||
check_fp(src + 'a', 1)
|
||||
check_fp(src + "else:\n a = ''\na", 1)
|
||||
differ.initialize(src + 'a')
|
||||
differ.parse(src + "else:\n a = ''\na", copies=1, parsers=1)
|
||||
|
||||
|
||||
def test_func_with_for_and_comment():
|
||||
|
||||
Reference in New Issue
Block a user