diff --git a/pydatastructs/linear_data_structures/tests/test_linked_lists.py b/pydatastructs/linear_data_structures/tests/test_linked_lists.py index 63d473bbd..0087031f4 100644 --- a/pydatastructs/linear_data_structures/tests/test_linked_lists.py +++ b/pydatastructs/linear_data_structures/tests/test_linked_lists.py @@ -13,15 +13,16 @@ def test_DoublyLinkedList(): dll.insert_after(dll[-1], 4) dll.insert_after(dll[2], 6) dll.insert_before(dll[4], 1) + dll.insert_before(dll[0], 7) dll.insert_at(0, 2) dll.insert_at(-1, 9) dll.extract(2) dll.extract(0) dll.extract(-1) dll[-2].data = 0 - assert str(dll) == "[2, 1, 6, 1, 0, 9]" - assert len(dll) == 6 - assert raises(IndexError, lambda: dll.insert_at(7, None)) + assert str(dll) == "[7, 5, 1, 6, 1, 0, 9]" + assert len(dll) == 7 + assert raises(IndexError, lambda: dll.insert_at(8, None)) assert raises(IndexError, lambda: dll.extract(20)) dll_copy = copy.deepcopy(dll) for i in range(len(dll)):