def test_delete_5(self):
        linked_list = LinkedList()
        linked_list.add_in_tail(self.n1)
        linked_list.add_in_tail(self.n2)

        linked_list.delete(12)
        self.assertEqual(linked_list.head, self.n2)
        self.assertEqual(linked_list.tail, self.n2)
    def test_delete_all_1(self):
        linked_list = LinkedList()
        linked_list.add_in_tail(self.n1)
        linked_list.add_in_tail(self.n2)

        linked_list.delete(12, True)
        self.assertEqual(linked_list.head, None)
        self.assertEqual(linked_list.tail, None)
    def test_delete_4(self):
        linked_list = LinkedList()
        linked_list.add_in_tail(self.n3)
        linked_list.add_in_tail(self.n4)
        linked_list.add_in_tail(self.n6)
        
        linked_list.delete(12)

        self.assertEqual(linked_list.head, self.n3)
        self.assertEqual(self.n3.next, self.n6)
        self.assertEqual(linked_list.tail, self.n6)
    def test_delete_all_3(self):
        linked_list = LinkedList()
        linked_list.add_in_tail(self.n1)
        linked_list.add_in_tail(self.n2)
        linked_list.add_in_tail(self.n3)
        linked_list.add_in_tail(self.n4)
        linked_list.add_in_tail(self.n5)
        linked_list.add_in_tail(self.n6)
        linked_list.add_in_tail(self.n7)
        linked_list.add_in_tail(self.n8)


        linked_list.delete(12, True)
        self.assertEqual(linked_list.head, self.n3)
        self.assertEqual(linked_list.tail, self.n6)
        self.assertEqual(self.n3.next, self.n6)