def test_max_withNotEmptyTree_shouldReturnLargestKeyFromTree(self): bst = Treap() for i in range(1, 20): bst.put(i, i) self.assertEqual(i, bst.max())
def test_max_withEmptyTree_shouldReturnNone(self): bst = Treap() self.assertIsNone(bst.max())