Esempio n. 1
0
def test_remove():
    ll = LinkedList()
    ll.dump(5, 4, 3, 2, 1)
    ll.remove(1)
    ll.remove(5)

    ll2 = LinkedList()
    ll2.dump(4, 3, 2)

    assert repr(ll) == repr(ll2)
Esempio n. 2
0
def test_valueerror_remove():
    ll = LinkedList()
    ll.dump(5, 4, 3, 2, 1)
    with pytest.raises(ValueError):
        ll.remove(8)