def test_Right(self):
     tree = BinaryTree()
     root = tree.add_root(BinaryTreeNode(5))
     self.create_binary_search_tree(tree, [3, 1, 2, 7, 6])
     # tree.Display()
     assert tree.right(root) != None
     assert tree.right(root).val == 7
Пример #2
0
 def test_Right(self):
     tree = BinaryTree()
     root = tree.add_root(BinaryTreeNode(5))
     self.create_binary_search_tree(tree, [3, 1, 2, 7, 6])
     # tree.Display()
     assert tree.right(root) != None
     assert tree.right(root).val == 7