Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • tsh2n14/2425-AICE1003-CourseworkTests
1 result
Show changes
Commits on Source (3)
......@@ -27,6 +27,10 @@ the test suit with more tests of your own.
right and to go straight.
- `test_shortest_path.py`: Some unit tests for testing the `shortest_path`
function (in `maze.py` for Part 4).
- `test_maze_reader.py`: Some initial unit tests for testing the
`maze_reader()` function (in `maze_runner.py` for Part 5).
- Folder `mazes` contains some mazes of different sizes for manual testing.
- More tests will be added as the coursework specification evolves.
......
#####
#...#
#####
\ No newline at end of file
#####
#...##
#####
\ No newline at end of file
This diff is collapsed.
#############################################################
#.#.......#...#.#.....#.............#...........#.....#.....#
#.###.###.#.#.#.#####.#.#####.#############.#.#.###.#####.###
#.......#.#.#...#.........#...#.#.........#.#.#.......#...#.#
#.#####.#######.#######.#.###.#.#.#.#.#.###.#######.###.#.#.#
#.#.#.#.#...#.........#.#...#.#...#.#.#...#.#...#.....#.#...#
#.#.#.###.#.###.#####.###.###.#.###.#.#######.#.#.#########.#
#.......#.#.#.#...#...#...#.......#.#.......#.#.......#...#.#
#.###.#####.#.###.#######.#####.#.#####.###.#####.###.###.#.#
#...#...#...#...#.#.......#.....#.#.....#...#...#.#.#.....#.#
#.###.###.###.#.#.#.#######.#.#.#####.###.#.#.#.###.###.###.#
#.#.#...#.#...#.........#.#.#.#.#.......#.#.#.#.#.#...#.#...#
#.#.###.#.#.###.#########.#.#.#.###.#####.###.###.###.#.#.###
#.#.#.....#.#...#.#.......#.#.#.#...#...#.#.#.#...#...#.....#
#.#.###.#####.#.#.#####.#.###.###.###.#.###.#.#.#.#.#.###.###
#.....#...#...#.......#.#...#.#.....#.#.#.#.....#...#.......#
###.###.#.###.#.#.#####.#########.#.#.###.#####.###.#.#####.#
#...#...#.#.#.#.#...#.....#.#.#.#.#...#...#...#...#.#.#...#.#
#.#.###.###.###.#.###.#.###.#.#.#.#######.###.#######.###.#.#
#.#...#.#...#...#...#.#...#...................#...#.......#.#
#.###.###.#######.#######.#######.#.###.#.#######.#.#####.#.#
#.#...........#...#.#.#.....#.#...#...#.#.....#.......#.#.#.#
###.#####.#.#####.#.#.#.#####.###.#.#.###.#.#.#.#######.###.#
#.#.#...#.#...............#.#...#.#.#.#...#.#.#...........#.#
#.#.#.###.#.#########.#####.###.#####.###.#####.#.#####.#####
#.#.#.....#.....#...#.#...........#...#.........#.#.#.#...#.#
#.###.#####.#######.#.#######.###########.#######.#.#.#####.#
#.#...#.#.#...#.......#.#.#...#...#.........#.........#...#.#
#.#.###.#.#.#########.#.#.###.###.#.###.###.#.#####.#.#.###.#
#.....#.....#.................#.......#...#.#.....#.#.......#
#############################################################
\ No newline at end of file
#############################################################
#.....#.#.....#.....#.....#...........#.........#.....#.....#
#.#.#.#.#.#.###.#.#.#.###.#######.#.#####.#####.#.###.#.#.###
#.#.#.....#...#.#.#.....#.....#...#.#...#...#...#.#.....#...#
#.###########.#.###.#.#.#####.#.###.#.###.###.#####.###.###.#
#.....#...#...#.#.#.#.#...#.#...#.........#...#.#.....#.#.#.#
#.#.###.#####.#.#.###.###.#.###.#####.###.###.#.#####.###.#.#
#.#.#.......#.#.#.#...#...#.#.......#.#.....#.......#...#...#
#.###.#.###.###.#.###.#####.#######.#############.#.#.#.###.#
#...#.#.#.......#.........#.....#...#.....#.......#.#.#.#.#.#
#.###.#.#########.#########.###.#.###.#####.#.#.###.###.#.#.#
#...#.#...#.#...........#.....#.#.#.#...#.#.#.#...#.#.#...#.#
#.#########.#####.#############.#.#.#.###.#.#####.#.#.#.###.#
#.............#.....#...#.#.#...#...#.....#.....#.#.......#.#
#.###.#.###.###.#####.###.#.###.#.#.#.#.#.#.#.###########.#.#
#...#.#...#.....#.....#.....#.....#.#.#.#...#.........#.#.#.#
#####.#######.#.#.#######.###.#######.#####.###.#######.###.#
#.#.....#...#.#.#.#.#.#...#...#.......#.#...#.......#...#...#
#.#######.#####.#.#.#.#.#####.#.#.#####.###########.#.###.###
#.......#.......#...#.#...#...#.#...........#.....#.#...#...#
#.#######.#.#.#.###.#.#.#.#################.###.###.#.#.#####
#.#.#.#...#.#.#.#.#.#...#.#.#...#.#.........#.#.......#.#...#
#.#.#.###.###.###.#.#.#.###.#.###.#.#.#######.#.###.#####.###
#.#.....#.#.....#.....#.....#.#.#.#.#.#.........#.......#.#.#
#.###.#.#######.#.#######.###.#.#.#########.#########.###.#.#
#.....#.......#.#.....#.........#.....#.......#.......#.....#
#.###.#####.###.#.###.#.###.#####.#.#####.###.###.###.#.#####
#.#...#.........#...#.#...#.#.....#.........#.#.....#.#...#.#
#.#########.#.#.#.#.#.#.#########.###.###########.###.#.###.#
#.........#.#.#...#.#.#...#.........#...#...........#.......#
#############################################################
\ No newline at end of file
#########################################
#...#.....#...#.........#.#.#...#.......#
#.###.#.###.#.###.###.#.#.#.#.#.#.#.###.#
#...#.#...#.#.#.....#.#...#...#...#...#.#
#.###.#####.#.#.###.###.#######.#########
#.....#...#.#...#...#.#.#.#...#.....#...#
#.#####.#############.#.#.#.#######.###.#
#...........#.#.....#.............#.....#
#####.#####.#.#####.#.###.#####.#####.###
#.#.......#.......#.#.#.....#.#.#.......#
#.#.#.###.#########.#########.#.#.###.#.#
#...#.#.......#.......#...#...#.....#.#.#
#.###.#######.###.#.#.#.#.#.#.#.#.#####.#
#.#.#.......#.....#.#...#...#.#.#.#.#...#
#.#.###.#.#######.#.#####.#######.#.#####
#.....#.#.#...#...#...#.....#.#...#.....#
#.#####.#.#.#########.###.#.#.#.#####.###
#.#.....#.......#...#...#.#.#...#.#.....#
#.#.#.#.#.###.#.#.#.#.#.###.#.#.#.#####.#
#.#.#.#.#.#...#...#.#.#...#...#.........#
#########################################
\ No newline at end of file
#########################################
#...#.....#.........#.#.#.#.#.#.........#
#.###.#.#.#.###.###.#.#.#.#.#.#.#.#####.#
#...#.#.#.....#.#.....#.......#.#.#...#.#
###.#########.#.###.#.#.#.###.#.#.#.###.#
#.#.....#.#.#.#.#.#.#.#.#.#...#.#...#...#
#.###.###.#.#.###.#.#.#####.###.#####.#.#
#...#.......#...#...#...#...#.....#...#.#
#.#.###.#########.#.###.#.#.#####.#####.#
#.#...#...#.....#.#.#.#.#.#.......#...#.#
#.#.#.#.###.#.###.#.#.#####.#.###.#.#.#.#
#.#.#...#...#...#.#.#.#.....#.#.#...#.#.#
#.#.#####.###.#.#.###.###.###.#.###.#.#.#
#.#...#.#.#.#.#.#.....#.....#...#...#.#.#
#.###.#.#.#.#########.#.###.#.#####.#.###
#...#.....#.......#...#.#...#.#.....#...#
#.#####.#.###.###.###.###.#######.#.#.#.#
#...#.#.#.....#...........#.#.....#.#.#.#
#.###.#.###.#.#######.#####.#.#.#.#.#.###
#.....#.#...#.#.......#.......#.#.#.#...#
#########################################
\ No newline at end of file
#####################
#.....#.#...#.....#.#
###.###.#.#####.###.#
#.....#...#.....#...#
#####.#.###.#.#.###.#
#...#.#.....#.#.....#
###.#.#.#####.#.#.###
#.......#.....#.#.#.#
#.###.#.#####.#####.#
#...#.#.....#.......#
#.#.#.#####.#.#######
#.#.#.#.....#.......#
###.###.#####.#####.#
#.#.#.#.#...#.#...#.#
#.#.#.#####.#####.#.#
#...#...#...#.....#.#
#.#####.###.#.#####.#
#...#.........#.#.#.#
###.#.#####.###.#.#.#
#.......#...#.......#
#####################
\ No newline at end of file
#####################
#.......#...#.#.....#
###.###.###.#.#.#.###
#.#.#.#.........#...#
#.#.#.#.#.#.###.#.###
#...#.#.#.#...#.#...#
#.###.#######.#.#.#.#
#.#.....#.#.#.#.#.#.#
#.#.#.###.#.#######.#
#...#.#.....#...#.#.#
#.###.###.#####.#.#.#
#.#.........#.#...#.#
###.#.###.#.#.#.#####
#.#.#...#.#.......#.#
#.#####.###########.#
#...........#.#.....#
#.#######.###.#.#.###
#.#...#...#...#.#...#
#.#.#########.#.#.###
#...............#...#
#####################
\ No newline at end of file
#####################
#...#...#...........#
#.###.#.#.###.#####.#
#...#.#.#...#...#.#.#
###.#.#.#.#.###.#.###
#.....#.#.#...#...#.#
#.#####.###.###.#.#.#
#...#.#.#.....#.#...#
#.#.#.#####.###.###.#
#.#.........#...#...#
#####################
\ No newline at end of file
#####################
#.........#.........#
###.#######.###.#.###
#.........#...#.#...#
#.#.###.#.#####.#.#.#
#.#...#.#.......#.#.#
#.#####.#.#.#.#######
#.#.#...#.#.#.#.....#
###.#.#.#.#.###.#.#.#
#.....#.#.#.....#.#.#
#####################
\ No newline at end of file
###########
#.#.......#
#.#####.###
#...#.#...#
###.#.###.#
#...#...#.#
#.#.#.#.#.#
#.#.#.#.#.#
#.#.#.#.#.#
#.#...#...#
###########
\ No newline at end of file
###########
#...#.....#
#.###.###.#
#...#...#.#
#.#.#.#####
#.#...#...#
#####.#.###
#.#...#...#
#.#.###.#.#
#.......#.#
###########
\ No newline at end of file
#####
#.#.#
#.#.#
#...#
#####
\ No newline at end of file
#######
#.#...#
#.#.#.#
#...#.#
#.#.###
#.#...#
#######
\ No newline at end of file
"""
Created on Wed Nov 20 15:32:28 2024
"""
__author__ = "Son Hoang"
__copyright__ = "Copyright (c) 2024, University of Southampton"
__credits__ = ["Son Hoang"]
__licence__ = "MIT"
__version__ = "1.0"
__maintainer__ = "Son Hoang"
__email__ = "T.S.Hoang@soton.ac.uk"
__status__ = "Prototype"
import pytest
from maze import Maze
from maze_runner import maze_reader # type: ignore
def test_maze_reader_maze1() -> None:
maze: Maze = maze_reader("maze1.mz")
assert maze.width == 2
assert maze.height == 1
assert maze.get_walls(0, 0) == (True, False, True, True)
assert maze.get_walls(1, 0) == (True, True, True, False)
def test_maze_reader_maze2() -> None:
with pytest.raises(ValueError):
maze: Maze = maze_reader("maze2.mz")