Exemplo n.º 1
0
    def test_solver_three_steps(self):
        grid = zngr_solver.load_grid(filepath("test_small_grid.csv"))

        solver = zngr_solver.PuzzleSolver(grid)
        path = solver.find_maximal_path()

        assert_that(path.steps, equal_to("rru"))
        assert_that(path.value, equal_to(18))
Exemplo n.º 2
0
    def test_solver_three_steps(self):
        grid = zngr_solver.load_grid(filepath("test_small_grid.csv"))

        solver = zngr_solver.PuzzleSolver(grid)
        path = solver.find_maximal_path()

        assert_that(path.steps, equal_to("rru"))
        assert_that(path.value, equal_to(18))
Exemplo n.º 3
0
    def test_load_grid(self):
        grid = zngr_solver.load_grid(filepath("test_small_grid.csv"))

        assert_that(len(grid), equal_to(2))
        assert_that(grid[0], contains(1, 2, 3))
        assert_that(grid[1], contains(6, 5, 4))
Exemplo n.º 4
0
    def test_load_grid(self):
        grid = zngr_solver.load_grid(filepath("test_small_grid.csv"))

        assert_that(len(grid), equal_to(2))
        assert_that(grid[0], contains(1, 2, 3))
        assert_that(grid[1], contains(6, 5, 4))