def test_amplify_once_find_max_seq(self): test_cases = [] test_cases.append([Programs7.prog_a_1, [4, 3, 2, 1, 0], 43210]) test_cases.append([Programs7.prog_a_2, [0, 1, 2, 3, 4], 54321]) test_cases.append([Programs7.prog_a_3, [1, 0, 4, 3, 2], 65210]) 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_once_find_max_seq(prog) self.assertEqual(want_val, got_val) self.assertEqual(want_seq, got_seq)
def test_part1(self): file_data = parse("../../07/input.txt") [max_val, max_seq] = amplify_once_find_max_seq(file_data) self.assertEqual(max_val, 13848)