예제 #1
0
 def test_search(self):
     solution = Solution()
     res = solution.search([2, 5, 6, 0, 0, 1, 2], 0)
     self.assertEqual(res, True)
예제 #2
0
 def test_search_6(self):
     solution = Solution()
     res = solution.search([3, 1, 1, 1], 3)
     self.assertEqual(res, True)
예제 #3
0
 def test_search_3(self):
     solution = Solution()
     res = solution.search([1, 3, 5], 3)
     self.assertEqual(res, True)
예제 #4
0
 def test_search_2(self):
     solution = Solution()
     res = solution.search([3, 1], 0)
     self.assertEqual(res, False)
예제 #5
0
 def test_search_1(self):
     solution = Solution()
     res = solution.search([1], 1)
     self.assertEqual(res, True)
예제 #6
0
 def test_search_false(self):
     solution = Solution()
     res = solution.search([2, 5, 6, 0, 0, 1, 2], 3)
     self.assertEqual(res, False)