コード例 #1
0
 def test_insert_filled_index_last(self):
     linkedlist = CircularLinkedList([1, 2, 3, 4, 5])
     linkedlist.insert(4, 99)
     assert linkedlist[4] == 99
     assert len(linkedlist) == 6
コード例 #2
0
 def test_insert_from_empty(self):
     linkedlist = CircularLinkedList()
     with pytest.raises(IndexError):
         linkedlist.insert(0, 0)