Advent-of-Code/2021/22/test_code.py

19 lines
522 B
Python
Raw Normal View History

2021-12-22 13:54:39 +01:00
# SPDX-License-Identifier: MIT
# Copyright (c) 2021 Akumatic
from code import *
def test():
instructions = [read_file(f"test_input_{i}.txt") for i in range(1, 4)]
assert part1(instructions[0]) == 39
print("Passed short Part 1")
assert part1(instructions[1]) == 590784
print("Passed long Part 1")
assert part2(instructions[0]) == 39
assert part1(instructions[2]) == 474140
assert part2(instructions[2]) == 2758514936282235
print("Passed Part 2")
if __name__ == "__main__":
test()