Exemplo n.º 1
0
 def test_string_excludes_childless_nonterminals(self):
     tree = ParseTree(self.A, [])
     self.assertEqual(tree.string(), "")
Exemplo n.º 2
0
 def test_string_traverses_tree(self):
     tree = ParseTree(self.A, ["Hello", "world!"])
     self.assertEqual(tree.string(), "Hello world!")