# Path: tests/test_countable_bfs.py
# class TestCountable():
#     p = 3
# 
#     def run_test(self, problem_fn, planner, search):
#         print SEPARATOR
#         print problem_fn.__name__, self.planner, self.search
#         tamp_problem = problem_fn(p=self.p)
#         stream_problem = compile_problem(tamp_problem)
#         print stream_problem
#         if search == BFS:
#             search_fn = get_bfs()
#         elif search == FAST_DOWNWARD:
#             # 'dijkstra | astar | wastar1 | wastar2 | wastar3 | eager | lazy
#             search_fn = get_fast_downward('eager')
#         else:
#             raise ValueError(search)
#         if planner == INCREMENTAL:
#             plan, _ = incremental_planner(
#                 stream_problem, search=search_fn, waves=True, frequency=1, verbose=False)
#         elif planner == FOCUSED:
#             plan, _ = simple_focused(stream_problem, search=search_fn,
#                                      check_feasible=False, greedy=False, dfs=True, verbose=False)
#         else:
#             raise ValueError(planner)
#         self.assertTrue(plan is not None)
# 
#     def test_grasp(self):  # TODO - is there a way to automate this further
#         self.run_test(get_grasp_problem, self.planner, self.search)
# 
#     def test_distract(self):
#         self.run_test(get_distract_problem, self.planner, self.search)
# 
#     def test_shift(self):
#         self.run_test(get_shift_problem, self.planner, self.search)
# 
#     def test_invert(self):
#         self.run_test(get_invert_problem, self.planner, self.search)
# 
# Path: stripstream/algorithms/utils.py
# DEFAULT = 'default'
# BFS = 'bfs'
# FAST_DOWNWARD = 'fd'
# FAST_FORWARD = 'ff'
# LAPKT = 'lapkt'
# PYPLANNERS = 'pyplanners'
# INCREMENTAL, FOCUSED = 'incremental', 'focused'
# DEFAULT_SEARCH_NAME = BFS
#     DEFAULT_SEARCH_NAME = FAST_DOWNWARD
#     DEFAULT_SEARCH_NAME = FAST_FORWARD
#     DEFAULT_SEARCH_NAME = LAPKT
#     DEFAULT_SEARCH = get_fast_downward()
#     DEFAULT_SEARCH = get_fast_forward()
#     DEFAULT_SEARCH = get_lakpt()
#     DEFAULT_SEARCH = get_bfs()


import unittest
from tests.test_countable_bfs import TestCountable
from stripstream.algorithms.utils import FAST_DOWNWARD, INCREMENTAL, FOCUSED



class TestCountableIncrementalFD(TestCountable, unittest.TestCase):
    planner = INCREMENTAL
    search = FAST_DOWNWARD


class TestCountableFocusedFD(TestCountable, unittest.TestCase):
    planner = FOCUSED

# Path: tests/test_countable_bfs.py
# class TestCountable():
#     p = 3
# 
#     def run_test(self, problem_fn, planner, search):
#         print SEPARATOR
#         print problem_fn.__name__, self.planner, self.search
#         tamp_problem = problem_fn(p=self.p)
#         stream_problem = compile_problem(tamp_problem)
#         print stream_problem
#         if search == BFS:
#             search_fn = get_bfs()
#         elif search == FAST_DOWNWARD:
#             # 'dijkstra | astar | wastar1 | wastar2 | wastar3 | eager | lazy
#             search_fn = get_fast_downward('eager')
#         else:
#             raise ValueError(search)
#         if planner == INCREMENTAL:
#             plan, _ = incremental_planner(
#                 stream_problem, search=search_fn, waves=True, frequency=1, verbose=False)
#         elif planner == FOCUSED:
#             plan, _ = simple_focused(stream_problem, search=search_fn,
#                                      check_feasible=False, greedy=False, dfs=True, verbose=False)
#         else:
#             raise ValueError(planner)
#         self.assertTrue(plan is not None)
# 
#     def test_grasp(self):  # TODO - is there a way to automate this further
#         self.run_test(get_grasp_problem, self.planner, self.search)
# 
#     def test_distract(self):
#         self.run_test(get_distract_problem, self.planner, self.search)
# 
#     def test_shift(self):
#         self.run_test(get_shift_problem, self.planner, self.search)
# 
#     def test_invert(self):
#         self.run_test(get_invert_problem, self.planner, self.search)
# 
# Path: stripstream/algorithms/utils.py
# DEFAULT = 'default'
# BFS = 'bfs'
# FAST_DOWNWARD = 'fd'
# FAST_FORWARD = 'ff'
# LAPKT = 'lapkt'
# PYPLANNERS = 'pyplanners'
# INCREMENTAL, FOCUSED = 'incremental', 'focused'
# DEFAULT_SEARCH_NAME = BFS
#     DEFAULT_SEARCH_NAME = FAST_DOWNWARD
#     DEFAULT_SEARCH_NAME = FAST_FORWARD
#     DEFAULT_SEARCH_NAME = LAPKT
#     DEFAULT_SEARCH = get_fast_downward()
#     DEFAULT_SEARCH = get_fast_forward()
#     DEFAULT_SEARCH = get_lakpt()
#     DEFAULT_SEARCH = get_bfs()


# Path: tests/test_countable_fd.py
import unittest
from tests.test_countable_bfs import TestCountable
from stripstream.algorithms.utils import FAST_DOWNWARD, INCREMENTAL, FOCUSED




class TestCountableIncrementalFD(TestCountable, unittest.TestCase):
    planner = INCREMENTAL
    search = FAST_DOWNWARD


class TestCountableFocusedFD(TestCountable, unittest.TestCase):
    planner = FOCUSED

    search = FAST_DOWNWARD