diff --git a/tests/test_graphplan.py b/tests/test_graphplan.py index e7e70bd77..3fd78bb54 100644 --- a/tests/test_graphplan.py +++ b/tests/test_graphplan.py @@ -152,10 +152,12 @@ def test_rush_hour_optimized(): verify_solution(rush_hour_optimized()) -def test_planner_leveloff(): - def run_planner_in_queue(problem, queue): - queue.put(Linearize(problem).execute()) +def run_planner_in_queue(problem, queue): + """Put the plan of the problem in the queue; at module level, so that it can be pickled.""" + queue.put(Linearize(problem).execute()) + +def test_planner_leveloff(): p = blocks_world( 'On(A, Table) & On(B, Table) & On(C, Table) & Clear(A) & Clear(B) & Clear(C)', 'On(A, B) & On(B, C) & On(C, A)',