def test_height_of_known_height_tree(self): ''' assert that the height of a tree known to be 4 is actually 4 ''' t = Tree() t.add(1) t.add(2) t.add(3) t.add(4) self.assertEqual(t.height(), 4)
def test_height_of_zero_node_tree(self): ''' assert that the height of a tree with no nodes should be 0 ''' t = Tree() self.assertEqual(t.height(), 0)