def test_insert_after_last(): list = LinkedList() list.append(1) list.append(2) list.append(3) list.insertAfter(3, 3.5) assert list.head.next.next.next.value == 3.5
def test_insert_after_middle(): list = LinkedList() list.append(1) list.append(2) list.append(3) list.insertAfter(2, 2.5) assert list.head.next.next.value == 2.5