def parse (self, source): t= self.parser.parse_source (source, self.info) ast1= ast_from_node (None, t, self.info) ast2= ast.parse (source) self.assertTrue (self.equal (ast1, ast2), "\n%s != \n%s" % (ast.dump (ast1), ast.dump (ast2)))
def parse(script, file_name=''): parser = PythonParser(None) info = CompileInfo(file_name, 'exec') return ast_from_node(None, parser.parse_source(script, info), info)
def parse (script, file_name=''): parser= PythonParser (None) info= CompileInfo (file_name, 'exec') return ast_from_node (None, parser.parse_source (script, info), info)
def parse(self, source): t = self.parser.parse_source(source, self.info) ast1 = ast_from_node(None, t, self.info) ast2 = ast.parse(source) self.assertTrue(self.equal(ast1, ast2), "\n%s != \n%s" % (ast.dump(ast1), ast.dump(ast2)))