def test_push_pop(): heap = Heap(num_list) assert (heap.pushpop(0) == -2) assert (heap.pushpop(-1) == -1) assert (heap.poppush(99) == 0) assert (heap.poppush(-10) == 3)
def test_push_pop(): heap = Heap(num_list) assert(heap.pushpop(0) == -2) assert(heap.pushpop(-1) == -1) assert(heap.poppush(99) == 0) assert(heap.poppush(-10) == 3)