示例#1
0
def test_prepend():
    l = BiList()
    l.prepend(42)
    l.prepend(43)
    l.prepend(44)
    l.prepend(45)
    assert len(l) == 4
    assert [el.value for el in l] == [45, 44, 43, 42]
示例#2
0
def test_prepend_empty():
    l = BiList()
    l.prepend(42)
    assert len(l) == 1
    assert [el.value for el in l] == [42]