예제 #1
0
 def test_delete_first_occurence_empty_list(self):
     l = LinkedList()
     original_python_list = l.to_python_list()
     l.deleteFirstOccurence(7)
     modified_python_list = l.to_python_list()
     self.assertEqual(original_python_list, modified_python_list)
예제 #2
0
 def test_delete_first_occurence(self):
     l = LinkedList([1, 2, 2, 3])
     l.deleteFirstOccurence(2)
     self.assertEqual(l.to_python_list(), [1, 2, 3])