def test(self): symbol_table = {'nancy': Bob} document = dedent(""" nancy( name='bill', hobbies=[1, 2, 3] ) """) results = parse(parsers.python_callbacks_parser(symbol_table), document) self.assertEqual([Bob(name='bill', hobbies=[1, 2, 3])], results) self.assertEqual('nancy', results[0]._asdict()['type_alias'])
def test_python_classic(self): graph = self.create_graph( build_pattern=r'.+\.BUILD$', parser=python_callbacks_parser(symbol_table=self.symbol_table)) self.do_test_codegen_simple(graph)
def test_python_classic(self): graph = self.create_graph(build_pattern=r'.+\.BUILD$', parser=python_callbacks_parser(symbol_table=self.symbol_table)) self.do_test_codegen_simple(graph)