def test_make_heap_random(): heap = pq() heap.insert(9, 9) heap.insert(8, 8) heap.insert(7, 7) assert heap.container.heap[0].val == 7 assert heap.container.heap[1].val == 9 assert heap.container.heap[2].val == 8
def make_heap_empty(): return pq()
def make_heap_three(): return pq([n(1, 1), n(2, 2), n(3, 3)])
def make_heap_random(): return pq([n(5, 5), n(2, 2), n(7, 7), n(1, 1), n(0, 0), n(3, 3), n(6, 6), n(8, 8), n(4, 4), n(9, 9)])
def make_heap_one(): return pq([n(1, 1)])