diff --git a/test_mazes.py b/test_mazes.py index 3829ed0..81420dc 100644 --- a/test_mazes.py +++ b/test_mazes.py @@ -1,6 +1,7 @@ """ Basic tests to ensure maze files are properly formatted. """ +from collections import Counter from pathlib import Path import re @@ -114,6 +115,15 @@ def test_boundaries(maze_file): assert all(h == '---' for h in north_boundary + south_boundary) +@all_mazes +def test_starting_cell_unique(maze_file): + """ + The starting cell, if marked, must be unique. + """ + rows = read_maze(maze_file) + assert Counter(''.join(rows))['S'] in (0, 1) + + @competition_mazes def test_starting_cell(maze_file): """