def test_min_withNotEmptyTree_shouldReturnSmallestKeyFromTree(self): bst = Treap() for i in range(-1, -20, -1): bst.put(i, i) self.assertEqual(i, bst.min())
def test_min_withEmptyTree_shouldReturnNone(self): bst = Treap() self.assertIsNone(bst.min())