Exemplo n.º 1
0
 def test_find_int_empty_list(self):
     idx = list.find_int(3, [])
     self.assertIsNone(idx)
Exemplo n.º 2
0
 def test_find_int_not_found(self):
     idx = list.find_int(3, [1, 2, 4, 5, 7, 9])
     self.assertIsNone(idx)
Exemplo n.º 3
0
 def test_find_int_single_element_list(self):
     idx = list.find_int(3, [
         3,
     ])
     self.assertEqual(idx, 0)
Exemplo n.º 4
0
 def test_find_int_first_half(self):
     idx = list.find_int(4, [1, 2, 4, 5, 7, 9])
     self.assertEqual(idx, 2)
Exemplo n.º 5
0
 def test_find_int_second_half(self):
     idx = list.find_int(7, [1, 2, 4, 5, 7, 9])
     self.assertEqual(idx, 4)
Exemplo n.º 6
0
 def test_find_int_empty_list(self):
     idx = list.find_int(3, [])
     self.assertIsNone(idx)
Exemplo n.º 7
0
 def test_find_int_single_element_list(self):
     idx = list.find_int(3, [3, ])
     self.assertEqual(idx, 0)
Exemplo n.º 8
0
 def test_find_int_not_found(self):
     idx = list.find_int(3, [1, 2, 4, 5, 7, 9])
     self.assertIsNone(idx)
Exemplo n.º 9
0
 def test_find_int_second_half(self):
     idx = list.find_int(7, [1, 2, 4, 5, 7, 9])
     self.assertEqual(idx, 4)
Exemplo n.º 10
0
 def test_find_int_first_half(self):
     idx = list.find_int(4, [1, 2, 4, 5, 7, 9])
     self.assertEqual(idx, 2)