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