def test_part2_input(self): result = day05.part2(aoc.read_input('day05.input')) self.assertEqual(result, 6136)
def test_day05_part2_longer(test_input, output): program = ('3,21,1008,21,8,20,1005,20,22,107,8,21,20,1006,20,31,' '1106,0,36,98,0,0,1002,21,125,20,4,20,1105,1,46,104,' '999,1105,1,46,1101,1000,1,20,4,20,1105,1,46,98,99') assert day05.part2([program], test_input) == output
def test_part2_example1(self): result = day05.part2(self.example) self.assertEqual(result, 4)
def test_day05_part2_puzzle(): assert day05.part2(open('input05.txt'), 5) == 7731427
def test_day05_part2(program, test_input, output): assert day05.part2([program], test_input) == output
def test_regressions(self): self.assertEqual(5182797, part1()) self.assertEqual(12077198, part2())
def test_part2_sample(input_data): assert part2(input_data) == 633
def test_part2_input(self): result = day05.part2(aoc.read_input('day05.input')) self.assertEqual(3419022, result)
def test_part2(): assert part2("day05/day05.dat") == 4624
def test_part2(): assert part2() == 25347697
def test_5_2_examples(): examples = [] for (inp, out) in examples: assert out == day05.part2(inp)
def test_part2(): assert part2(PUZZLE_INPUT) == 741