def test_search_failure(self): ids = IterativeDeepeningSearch() # 5 - is a goal state but it's unreachable problem = Problem(1, TestActionsFunction(2), TestResultFunction(), TestGoalTest(5)) result = ids.search(problem) self.assertTrue(ids.is_failure(result))
def test_successful_search(self): ids = IterativeDeepeningSearch() problem = Problem(1, TestActionsFunction(), TestResultFunction(), TestGoalTest(4)) result = ids.search(problem) self.assertEquals(3, len(result))
def test_search_failure(self): ids = IterativeDeepeningSearch() # 5 - is a goal state but it's unreachable problem = Problem(1, TestActionsFunction(2), TestResultFunction(), TestGoalTest(5)) result = ids.search(problem) self.assertTrue(ids.is_failure(result))
def test_successful_search(self): ids = IterativeDeepeningSearch() problem = Problem(1, TestActionsFunction(), TestResultFunction(), TestGoalTest(4)) result = ids.search(problem) self.assertEquals(3, len(result))