def test_max_depth_1(self): tree = Node.Node(5, None, None) self.assertEqual(1, TreeOperations.maximum_depth(tree))
def test_max_depth_2_right(self): tree = Node.Node(5, None, Node.Node(3, None, None)) self.assertEqual(2, TreeOperations.maximum_depth(tree))
def test_max_depth_empty(self): self.assertEqual(0, TreeOperations.maximum_depth(None))