def test_trapped2(self): """Should return `False` if there's no way out""" maze = "\n".join(["......", "......", "......", "......", ".....W", "....W."]) self.assertFalse(main.path_finder(maze))
def test_exitable2(self): """Should return `10` if the shortest way out is 10 steps""" maze = "\n".join(["......", "......", "......", "......", "......", "......"]) self.assertTrue(main.path_finder(maze))
def test_exitable1(self): """Should return `True` if there's a way out""" maze = "\n".join([".W.", ".W.", "..."]) self.assertTrue(main.path_finder(maze))