def test_25_Colours(self): inp = Map("images/25colours.ppm") # Currently being run with your solution... But this # will be replaced with a call to mine. findPath(inp, all_colour_speed) # Outputs both the path and gradient along it. # Uncomment these out if you want to use them inp.outputPath()
def test_Gradient_One(self): inp = Map("images/grad.ppm") cost = findPath(inp, hue_speed) inp.outputPath() self.assertAlmostEqual(cost, 2.5939828, 5)
def test_Maze_Big(self): inp = Map("images/bigmaze.ppm") cost = findPath(inp, white_speed) inp.outputPath() self.assertAlmostEqual(cost, 19.53492146, 5)
def test_Maze(self): inp = Map("images/maze.ppm") cost = findPath(inp, white_speed) inp.outputPath() self.assertAlmostEqual(cost, 28.09135288, 5)
def test_Two(self): inp = Map("images/spiral.ppm") cost = findPath(inp, hue_speed) inp.outputPath() self.assertAlmostEqual(cost, 14.49090829, 5)
def test_One(self): inp = Map("images/water.ppm") cost = findPath(inp, hue_speed) inp.outputPath() self.assertAlmostEqual(cost, 1.601784327, 5)
def test_Gradient_Two(self): inp = Map("images/grad.ppm") cost = findPath(inp, white_speed) inp.outputPath() self.assertAlmostEqual(cost, 5.8539818, 5)