def test_amplify_loop_max_seq(self): test_cases = [] test_cases.append([Programs7.prog_b_1, [9, 8, 7, 6, 5], 139629729]) test_cases.append([Programs7.prog_b_2, [9, 7, 8, 5, 6], 18216]) for test_case in test_cases: prog = test_case[0] want_seq = test_case[1] want_val = test_case[2] [got_val, got_seq] = amplify_loop_max_seq(prog) self.assertEqual(want_val, got_val) self.assertEqual(want_seq, got_seq)
def test_part2(self): file_data = parse("../../07/input.txt") [max_val, max_seq] = amplify_loop_max_seq(file_data) self.assertEqual(max_val, 12932154)