def test_part2(self): input = [ "101 301 501", "102 302 502", "103 303 503", "201 401 601", "202 402 602", "203 403 603" ] output = 6 self.assertEqual(Day03.solve_part2(input), output)
def test_part1(self): inputs = [1, 12, 23, 1024] outputs = [0, 3, 2, 31] for input, output in zip(inputs, outputs): self.assertEqual(Day03.solve_part1(input), output)
def test_part1(self): input = ["5 10 25"] output = 0 self.assertEqual(Day03.solve_part1(input), output)
def test_part1(self): inputs = [">", "^>v<", "^v^v^v^v^v"] outputs = [2, 4, 2] for input, output in zip(inputs, outputs): self.assertEqual(Day03.solve_part1(input), output)
def test_part2(self): inputs = ["^v", "^>v<", "^v^v^v^v^v"] outputs = [3, 3, 11] for input, output in zip(inputs, outputs): self.assertEqual(Day03.solve_part2(input), output)
def test_part1(self): self.assertEqual(Day03.solve_part1(self.input),7)
def setUp(self): self.input = Day03().read_file("tests/test_day03.txt")