Exemplo n.º 1
0
def test_pop():
    ll = LinkedList()
    ll.dump(5, 3, 1, 0)

    assert ll.pop(0) == 5
    assert ll.pop(2) == 0
    assert ll.pop() == 1
Exemplo n.º 2
0
def test_indexerror_pop():
    ll = LinkedList()
    ll.dump(5, 3, 1, 0)

    with pytest.raises(IndexError):
        ll.pop(234)