use expression_list instead of commands or call_list

This commit is contained in:
Dave Halter
2013-12-27 14:24:14 +01:00
parent 76eec7bfc5
commit 4af92b166a
11 changed files with 51 additions and 50 deletions

View File

@@ -17,7 +17,7 @@ def test_user_statement_on_import():
class TestCallAndName():
def get_call(self, source):
stmt = Parser(source, no_docstr=True).module.statements[0]
return stmt.get_commands()[0]
return stmt.expression_list()[0]
def test_name_and_call_positions(self):
call = self.get_call('name\nsomething_else')

View File

@@ -119,7 +119,7 @@ class TestRegression(TestCase):
s = "x()\nx( )\nx( )\nx ( )"
parser = Parser(s)
for i, s in enumerate(parser.module.statements, 3):
for c in s.get_commands():
for c in s.expression_list():
self.assertEqual(c.execution.end_pos[1], i)
def check_definition_by_marker(self, source, after_cursor, names):