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