示例#1
0
 def test_part1(self):
     input = "3,4,1,5"
     output = 12
     actual = Day10.solve_part1(input, num_elements=5)
     self.assertEqual(actual, output,
                      f"input={input}, expected={output}, actual={actual}")
示例#2
0
 def test_part1(self):
     self.assertEqual(Day10.solve_part1(self.input, {3, 5}), 0)
示例#3
0
 def test_part1(self):
     input = Day10().read_file("tests/test_day10.1.txt")
     self.assertEqual(Day10.solve_part1(input), 35)
     input = Day10().read_file("tests/test_day10.2.txt")
     self.assertEqual(Day10.solve_part1(input), 220)