day12 finished
This commit is contained in:
parent
28fb30d493
commit
5c0183ab93
5 changed files with 163 additions and 0 deletions
24
advent/days/day12/test_solution.py
Normal file
24
advent/days/day12/test_solution.py
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
from advent.common import input
|
||||
|
||||
from .solution import Map, day_num, part1, part2
|
||||
|
||||
|
||||
def test_part1():
|
||||
lines = input.read_lines(day_num, 'test01.txt')
|
||||
expected = 31
|
||||
result = part1(lines)
|
||||
assert result == expected
|
||||
|
||||
|
||||
def test_part2():
|
||||
lines = input.read_lines(day_num, 'test01.txt')
|
||||
expected = 29
|
||||
result = part2(lines)
|
||||
assert result == expected
|
||||
|
||||
|
||||
def test_path():
|
||||
lines = input.read_lines(day_num, 'test01.txt')
|
||||
expected = 31
|
||||
result = Map.create(lines).find_path('S')
|
||||
assert result == expected
|
||||
Loading…
Add table
Add a link
Reference in a new issue