advent-of-code/2020-python/tests/test_day_01.py

29 lines
589 B
Python
Raw Normal View History

2021-11-01 16:40:46 +01:00
import unittest
from solutions.day_01 import Solution
class Day01TestCase(unittest.TestCase):
def setUp(self):
self.solution = Solution()
self.puzzle_input = self.solution.parse_input(
"""
1721
979
366
299
675
1456
"""
)
def test_find_matching_pair(self):
assert self.solution.solve(self.puzzle_input) == 514579
def test_find_matching_triplet(self):
assert self.solution.solve_again(self.puzzle_input) == 241861950
if __name__ == "__main__":
unittest.main()