Пример #1
0
 def testGetWidthMazeWithMultipleSolutionsShouldBeFive(self):
     maze = Maze('mazes/maze_with_multiple_solutions.txt', QueueFrontier())
     self.assertEqual(5, maze._get_width())
Пример #2
0
 def testGetWidthMazeWithTurnShouldBeFive(self):
     maze = Maze('mazes/maze_with_turn.txt', QueueFrontier())
     self.assertEqual(5, maze._get_width())
Пример #3
0
 def testGetWidthLinearMazeShouldBeThree(self):
     maze = Maze('mazes/linear_maze.txt', QueueFrontier())
     self.assertEqual(3, maze._get_width())
Пример #4
0
 def testGetWidthMazeWithDeadEndShouldBeFive(self):
     maze = Maze('mazes/maze_with_dead_end.txt', QueueFrontier())
     self.assertEqual(5, maze._get_width())
Пример #5
0
 def testGetWidthFromOneByOneShouldBeOne(self):
     maze = Maze('mazes/linear_maze.txt', QueueFrontier())
     maze._maze = [['#']]
     self.assertEqual(1, maze._get_width())
Пример #6
0
 def testGetWidthFirstRowEmptyShouldBeZero(self):
     maze = Maze('mazes/linear_maze.txt', QueueFrontier())
     maze._maze = []
     self.assertEqual(0, maze._get_width())
Пример #7
0
 def testGetWidthEmptyMazeShouldBeZero(self):
     maze = Maze('mazes/linear_maze.txt', QueueFrontier())
     maze._maze = None
     self.assertEqual(0, maze._get_width())
Пример #8
0
 def testGetWidthVeryShortMazeShouldBeThree(self):
     maze = Maze('mazes/very_short_maze.txt', QueueFrontier())
     self.assertEqual(3, maze._get_width())
Пример #9
0
 def testGetWidthShortestPossibleMazeShouldBeThree(self):
     maze = Maze('mazes/shortest_possible_maze.txt', QueueFrontier())
     self.assertEqual(3, maze._get_width())