예제 #1
0
    def test_10(self):
        sample_data = day10.get_data(day10.SAMPLE_PATH)
        self.assertEqual(day10.part_1(sample_data[0]), 35)
        self.assertEqual(day10.part_2(sample_data[0]), 8)
        self.assertEqual(day10.part_1(sample_data[1]), 220)
        self.assertEqual(day10.part_2(sample_data[1]), 19208)

        challenge_data = day10.get_data(day10.INPUT_PATH)[0]
        self.assertEqual(day10.part_1(challenge_data), 2760)
        self.assertEqual(day10.part_2(challenge_data), 13816758796288)
예제 #2
0
 def test_with_input(self):
     joltages = utils.read_input_lines(10)
     self.assertEqual(day10.part_2(joltages), 64793042714624)
예제 #3
0
 def test_example_2(self):
     self.assertEqual(day10.part_2(EXAMPLE_2), 19208)
예제 #4
0
 def test_example_1(self):
     self.assertEqual(day10.part_2(EXAMPLE_1), 8)
예제 #5
0
 def test_example_tiny(self):
     joltages = [1, 4, 5, 6]
     self.assertEqual(day10.part_2(joltages), 2)
예제 #6
0
 def test_part_2_real_input(self):
     result = part_2(input)
     self.assertEqual(result, 148098383347712)
예제 #7
0
 def test_part_2_second_example(self):
     result = part_2(example_2)
     self.assertEqual(result, 19208)
예제 #8
0
 def test_part_2_first_example(self):
     result = part_2(example_1)
     self.assertEqual(result, 8)