def test_integration_init_stage_content_step_12_t1(self): step1.get_plan("../../input/domain_blocks.pddl", "../../input/bw08.pddl") predicates_list = dom_par.get_domain_json( "../../input/domain_blocks.pddl") problem_json = step2.get_problem_json("../../input/bw08.pddl", predicates_list) pattern = re.compile(r'\w\s\w') result = pattern.findall(str(problem_json)) self.assertTrue(result)
def test_integration_goal_stage_step_12(self): step1.get_plan("../../input/domain_blocks.pddl", "../../input/bw08.pddl") predicates_list = dom_par.get_domain_json( "../../input/domain_blocks.pddl") problem_json = step2.get_problem_json("../../input/bw08.pddl", predicates_list) text = ''.join(str(e) for e in problem_json) st = text[text.index("goal") + len("goal"):] self.assertTrue(st)
def test_integration_predicate_each_stage_step123(self): domain_file = "../../input/domain_blocks.pddl" problem_file = "../../input/bw08.pddl" predicates_list = dom_par.get_domain_json( "../../input/domain_blocks.pddl") plan = step1.get_plan(domain_file, problem_file) problem_json = step2.get_problem_json(problem_file, predicates_list) stages = step3.get_stages(plan, problem_json, problem_file, predicates_list) self.assertTrue(stages)
def test_integration_predicates_object_list_step123(self): domain_file = "../../input/domain_blocks.pddl" problem_file = "../../input/bw08.pddl" predicates_list = dom_par.get_domain_json( "../../input/domain_blocks.pddl") plan = step1.get_plan(domain_file, problem_file) problem_json = step2.get_problem_json(problem_file, predicates_list) stages = step3.get_stages(plan, problem_json, problem_file, predicates_list) objectList = copy.deepcopy(stages["objects"]) self.assertTrue(len(objectList) > 1)
def test_integration_predicates_add2_step123(self): domain_file = "../../input/domain_blocks.pddl" problem_file = "../../input/bw08.pddl" predicates_list = dom_par.get_domain_json( "../../input/domain_blocks.pddl") plan = step1.get_plan(domain_file, problem_file) problem_json = step2.get_problem_json(problem_file, predicates_list) stages = step3.get_stages(plan, problem_json, problem_file, predicates_list) objectList = copy.deepcopy(stages["objects"]) stages = copy.deepcopy(stages["stages"]) register = 1 for counter in range(0, len(stages)): if ("remove" in stages[counter].keys()): register += 1 self.assertEqual(register, len(stages))
def test_integration_predicates_stage_size_step123(self): domain_file = "../../input/domain_blocks.pddl" problem_file = "../../input/bw08.pddl" predicates_list = dom_par.get_domain_json( "../../input/domain_blocks.pddl") plan = step1.get_plan(domain_file, problem_file) problem_json = step2.get_problem_json(problem_file, predicates_list) stages = step3.get_stages(plan, problem_json, problem_file, predicates_list) objectList = copy.deepcopy(stages["objects"]) stages = copy.deepcopy(stages["stages"]) register = 0 for counter in range(0, len(stages)): if len(stages[counter]) > 1: register += 1 self.assertTrue(register > 2)