def test_constructor_shouldCreateEmptySplayTree(self): bst = Treap() self.assertTrue(bst.empty()) self.assertEqual(0, len(bst)) self.assertEqual(-1, bst.height())
def test_deleteMax_withEmptyTree_shouldNotModifyTree(self): bst = Treap() bst.delete_max() self.assertEqual(0, len(bst)) self.assertEqual(-1, bst.height())