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]
def test_prepend_empty(): l = BiList() l.prepend(42) assert len(l) == 1 assert [el.value for el in l] == [42]