예제 #1
0
 def test_func_def_statement_list_machine(self, interpret_func_def):
     func = FunctionDef('name')
     args = ArgumentList()
     body = StatementList()
     func.children = [args, body]
     scope = {}
     interpret_statement(None, func, scope)
     interpret_func_def.assert_called_with(func, scope)
예제 #2
0
 def test_def_func(self):
     func = FunctionDef('name')
     args = ArgumentList()
     body = StatementList()
     func.children = [args, body]
     scope = {}
     interpret_func_def(func, scope)
     self.assertEqual(scope['name'], func)