示例#1
0
def test_find_path_length_fails_when_max_iter_exceeded():
    with pytest.raises(MazeException):
        find_path_length(10, (7, 4), max_iter=3)
示例#2
0
def test_find_path_length(base, stop, expected):
    assert find_path_length(base, stop) == expected
 def test_raise_if_maze_has_no_enterance(self):
     with pytest.raises(MazeException):
         find_path_length(MAZE_6)
 def test_raise_path_length_exided(self):
     with pytest.raises(MazeException):
         find_path_length(MAZE_7, max_iter=3)
 def test_find_path_length(self, maze, expected):
     assert find_path_length(maze) == expected