Пример #1
0
def test_duplicate():
    h = MinBinaryHeap([1, 2, 3])
    h.push(1)
    assert h.heap_list == [1, 1, 3, 2]
Пример #2
0
def test_edge_case():
    h = MinBinaryHeap([1, 5, 8, 7, 9, 10, 11])
    h.push(4)
    assert h.heap_list == [1, 4, 8, 5, 9, 10, 11, 7]