def test_find_middle_single_node(self):
     """Testing linked list"""
     linked_list = LinkedList()
     linked_list.push_front(1)
     self.assertEqual(linked_list.find_mid(), 1)
 def test_find_middle_even_long(self):
     """Testing linked list"""
     linked_list = LinkedList((5, 3, 2, 8, 9, 11, 23, 28, 67, 99, 82, 190,
                               12389, "foo", 4.2938, 123.1, 90, 1000))
     # in even case, decided that second of two is middle
     self.assertEqual(linked_list.find_mid(), (99))
 def test_find_middle_longer(self):
     """Testing linked list"""
     linked_list = LinkedList((5, 3, 2, 8, 9, 11, 23, 28, 67, 99, 82, 190,
                               12389, "foo", 4.2938, 123.1, 90, 1000, True))
     self.assertEqual(linked_list.find_mid(), 99)
 def test_find_middle_even(self):
     """Testing linked list"""
     linked_list = LinkedList((5, 3, 2, 8, 9, 11, 1, 9, 100, 14))
     # in even case, decided that second of two is middle
     self.assertEqual(linked_list.find_mid(), (11))
 def test_find_middle(self):
     """Testing linked list"""
     linked_list = LinkedList((5, 3, 2, 8, 9))
     self.assertEqual(linked_list.find_mid(), 2)