From ade4ec6a8393c5173f1d6202131f4888384c861c Mon Sep 17 00:00:00 2001 From: Marianne Chevrot Date: Sun, 17 May 2020 11:22:23 +0200 Subject: separate solution generation and its display --- tests_solver/test_solver.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'tests_solver') diff --git a/tests_solver/test_solver.py b/tests_solver/test_solver.py index 1d441ff..808804e 100644 --- a/tests_solver/test_solver.py +++ b/tests_solver/test_solver.py @@ -216,15 +216,10 @@ def test_solver_load_and_type_1(): target_score = input_dict['target_score'] max_actions = input_dict['max_actions'] - mock_args = {'--help': False, - '--print': False, - '-p': False, - 'YAML_GRID': type_yaml_level_file, - } - assert loaded_grid == kanagrid_orig - kanagrid_new = search_all_solution(mock_args, loaded_grid, target_score, max_actions) + grids = list(search_all_solution(loaded_grid, target_score, max_actions)) - assert kanagrid_new == expected_grid + assert len(grids) == 1 + assert grids[0] == expected_grid -- cgit v1.2.3