Exemple #1
0
 def test11(self):
     solution = Solution()
     nums = [7, 8, 1, 2, 3, 4, 5, 6]
     self.assertEqual(solution.search(nums, 6), 7)
Exemple #2
0
 def test1(self):
     solution = Solution()
     nums = [4, 5, 6, 7, 0, 1, 2]
     self.assertEqual(solution.search(nums, 0), 4)
Exemple #3
0
 def test9(self):
     solution = Solution()
     nums = [3, 1]
     self.assertEqual(solution.search(nums, 1), 1)
Exemple #4
0
 def test7(self):
     solution = Solution()
     nums = [1, 2, 3]
     self.assertEqual(solution.search(nums, 2), 1)
Exemple #5
0
 def test5(self):
     solution = Solution()
     nums = [1, 2]
     self.assertEqual(solution.search(nums, 1), 0)
Exemple #6
0
 def test3(self):
     solution = Solution()
     nums = []
     self.assertEqual(solution.search(nums, 5), -1)