def test_part1_example3(self): input_list = [ "3,31,3,32,1002,32,10,32,1001,31,-2,31,1007,31,0,33," "1002,33,7,33,1,33,31,31,1,32,31,31,4,31,99,0,0,0" ] result = day07.part1(input_list) self.assertEqual(65210, result)
def test_part1_example2(self): input_list = [ "3, 23, 3, 24, 1002, 24, 10, 24, 1002, 23, -1, 23, 101, 5, 23, 23, 1, 24, 23, 23, 4," "23, 99, 0, 0" ] result = day07.part1(input_list) self.assertEqual(54321, result)
def test_day07_part1(): day07.part1('3,15,3,16,1002,16,10,16,1,16,15,15,4,15,99,0,0') == 43210 day07.part1( '3,23,3,24,1002,24,10,24,1002,23,-1,23,101,5,23,23,1,24,23,23,4,23,99,0,0' ) == 54321 day07.part1( '3,31,3,32,1002,32,10,32,1001,31,-2,31,1007,31,0,33,1002,33,7,33,1,33,31,31,1,32,31,31,4,31,99,0,0,0' ) == 65210
def test_part1_sample(sample_data): assert part1(sample_data) == 4
def test_part1(): assert part1("day07/day07.dat") == "HEGMPOAWBFCDITVXYZRKUQNSLJ" pass
def test_part1(): assert part1() == 'mkxke'
def test_part1(): assert day07.part1('input_day07.txt') == 437860
def test_day07_part1_answer(): assert day07.part1(open('input07.txt').read()) == 155
def test_part1_final_result(): with open("day07_input.txt") as f: original_tape = [int(x) for x in f.readline().split(",")] assert part1(original_tape) == 199988
def test_7_1_examples(): examples = [] for (inp, out) in examples: assert out == day07.part1(inp)
def test_part1(puzzle_input, answer): assert part1(puzzle_input) == answer
def test_regressions(self): self.assertEqual(17790, part1()) self.assertEqual(19384820, part2())
def test_part1_example1(self): input_list = ["3,15,3,16,1002,16,10,16,1,16,15,15,4,15,99,0,0"] result = day07.part1(input_list) self.assertEqual(43210, result)
def test_part1_input(self): result = day07.part1(aoc.read_input('day07.input')) self.assertEqual(11828, result)
def test_part1_example1(self): result = day07.part1(self.example) self.assertEqual(result, 'CABDFE')
def test_day07_part1(): assert day07.part1(day07_example) == 4
def test_part1_input(self): result = day07.part1(aoc.read_input('day07.input')) self.assertEqual(result, 'GDHOSUXACIMRTPWNYJLEQFVZBK')
def test_part1_params(tape, result): t = list_to_defaultdict(tape) assert part1(t) == result