def test_append(): doubly_linked_list = DoublyLinkedList() doubly_linked_list.append(3) doubly_linked_list.append(4) assert doubly_linked_list.size() == 2 assert doubly_linked_list.get(0) == 3 assert doubly_linked_list.get(1) == 4
def test_insert_empty(): doubly_linked_list = DoublyLinkedList() doubly_linked_list.insert(3, 0) assert doubly_linked_list.size() == 1 assert doubly_linked_list.get(0) == 3
def test_init(): linked_list = DoublyLinkedList() linked_list.append(3) assert linked_list.size() == 1 assert linked_list.get(0) == 3
def test_append_empty(): doubly_linked_list = DoublyLinkedList() doubly_linked_list.append(1) assert doubly_linked_list.size() == 1 assert doubly_linked_list.get(0) == 1