Day 6 part 1 solution.
This commit is contained in:
27
day6/test.py
Normal file
27
day6/test.py
Normal file
@@ -0,0 +1,27 @@
|
||||
from solver import Simulation
|
||||
|
||||
|
||||
test_data = r"""
|
||||
....#.....
|
||||
.........#
|
||||
..........
|
||||
..#.......
|
||||
.......#..
|
||||
..........
|
||||
.#..^.....
|
||||
........#.
|
||||
#.........
|
||||
......#...
|
||||
""".strip()
|
||||
|
||||
def test_visited():
|
||||
print("Beginning visited test")
|
||||
sim = Simulation.from_string(test_data)
|
||||
sim.run()
|
||||
visited = sim.total_visited()
|
||||
assert visited == 41
|
||||
print("Visited test passed")
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
test_visited()
|
||||
Reference in New Issue
Block a user