Ejemplo n.º 1
0
 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)
Ejemplo n.º 2
0
 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)
Ejemplo n.º 3
0
 def test_part1(self):
     input = ["5 10 25"]
     output = 0
     self.assertEqual(Day03.solve_part1(input), output)
Ejemplo n.º 4
0
 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)
Ejemplo n.º 5
0
 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)
Ejemplo n.º 6
0
 def test_part1(self):
     self.assertEqual(Day03.solve_part1(self.input),7)
Ejemplo n.º 7
0
 def setUp(self):
     self.input = Day03().read_file("tests/test_day03.txt")