Skip to content

Commit

Permalink
improve Codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
prshnt19 committed Feb 26, 2020
1 parent f42adaf commit 4e266a7
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)):
Expand Down

0 comments on commit 4e266a7

Please sign in to comment.