def test_rotated_one(self): arr = [9, 1, 2, 3, 4, 5, 6, 7, 8] self.assertEqual(9, find_max(arr, 0, len(arr)))
def test_no_rotated(self): arr = [1, 2, 3, 4, 5, 6, 7, 8, 9] self.assertEqual(9, find_max(arr, 0, len(arr)))
def test_rotated_seven_rep(self): arr = [3, 4, 5, 6, 7, 8, 9, 9, 1, 2] self.assertEqual(9, find_max(arr, 0, len(arr)))
def test_rotated_seven_negative(self): arr = [-7, -6, -5, -4, -3, -2, -1, -9, -8] self.assertEqual(-1, find_max(arr, 0, len(arr)))
def test_rotated_two_rep(self): arr = [8, 9, 9, 1, 2, 3, 3, 4, 4, 5, 6, 7] self.assertEqual(9, find_max(arr, 0, len(arr)))