Example #1
0
def test_find_path(bomb, test_mazes):
    """Test finding paths through each maze."""
    maze = Maze(bomb)
    for test_maze in test_mazes:
        maze.set_start(test_maze['start'])
        maze.set_goal(test_maze['goal'])
        maze.set_greens(test_maze['greens'])
        actual = maze.find_path()
        expected = test_maze['path']
        assert actual == expected
Example #2
0
def test_set_start(bomb):
    """Test setting the start for the maze."""
    start = (0, 1)
    maze = Maze(bomb)
    maze.set_start(start)

    actual = maze.start
    expected = start

    assert actual == expected