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)
def test_with_input(self): joltages = utils.read_input_lines(10) self.assertEqual(day10.part_2(joltages), 64793042714624)
def test_example_2(self): self.assertEqual(day10.part_2(EXAMPLE_2), 19208)
def test_example_1(self): self.assertEqual(day10.part_2(EXAMPLE_1), 8)
def test_example_tiny(self): joltages = [1, 4, 5, 6] self.assertEqual(day10.part_2(joltages), 2)
def test_part_2_real_input(self): result = part_2(input) self.assertEqual(result, 148098383347712)
def test_part_2_second_example(self): result = part_2(example_2) self.assertEqual(result, 19208)
def test_part_2_first_example(self): result = part_2(example_1) self.assertEqual(result, 8)