def test_find_index_empty_list(self): linked = LinkedList([]) self.assertEqual(None, linked.find_index(2))
def test_find_index_multiple_values_exist(self): linked = LinkedList(['one', 'two', 'third', 4, 6, 'pear', 4]) self.assertEqual(3, linked.find_index(4))
def test_find_index_value_doesnot_exist(self): linked = LinkedList(['one', 'two', 'third', 4, 6, 'pear', 4]) self.assertEqual(None, linked.find_index('four'))
def test_find_index_value_exist_1(self): linked = LinkedList(['one', 'two']) self.assertEqual(1, linked.find_index('two'))