Пример #1
0
 def test_eval_with_node(self):
     node = RootNode()
     combination = CombinationNode()
     combination.append(PrimitiveNode(add))
     combination.append(PrimitiveNode(1))
     combination.append(PrimitiveNode(2))
     node.append(combination)
     assert 3 == node.eval()
Пример #2
0
 def test_eval_without_node(self):
     node = RootNode()
     assert node.eval() is None