Exemple #1
0
 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'])
Exemple #2
0
 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)
Exemple #3
0
 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)