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