forked from VimPlug/jedi
Fix the remaining issues with the StatementElement.next refactoring.
This commit is contained in:
@@ -24,6 +24,9 @@ class TestCallSignatures(TestCase):
|
||||
|
||||
def test_simple(self):
|
||||
run = self._run_simple
|
||||
s7 = "str().upper().center("
|
||||
s8 = "str(int[zip("
|
||||
run(s7, 'center', 0)
|
||||
|
||||
# simple
|
||||
s1 = "sorted(a, str("
|
||||
|
||||
@@ -8,7 +8,7 @@ def parse_tree(statement_string, is_slice=False):
|
||||
stmt = p.module.statements[0]
|
||||
if is_slice:
|
||||
# get the part of the execution that is the slice
|
||||
stmt = stmt.expression_list()[0].execution[0]
|
||||
stmt = stmt.expression_list()[0].next[0]
|
||||
iterable = stmt.expression_list()
|
||||
pr = precedence.create_precedence(iterable)
|
||||
if isinstance(pr, precedence.Precedence):
|
||||
|
||||
@@ -104,7 +104,7 @@ class TestRegression(TestCase):
|
||||
parser = Parser(s)
|
||||
for i, s in enumerate(parser.module.statements, 3):
|
||||
for c in s.expression_list():
|
||||
self.assertEqual(c.execution.end_pos[1], i)
|
||||
self.assertEqual(c.next.end_pos[1], i)
|
||||
|
||||
def check_definition_by_marker(self, source, after_cursor, names):
|
||||
r"""
|
||||
|
||||
Reference in New Issue
Block a user