Example #1
0
 def test_part2(self):
     self.assertEqual(
         part2(parse("03036732577212944063491565474664"), 100), "84462026"
     )
     self.assertEqual(
         part2(parse("02935109699940807407585447034323"), 100), "78725270"
     )
     self.assertEqual(
         part2(parse("03081770884921959731165446850517"), 100), "53553731"
     )
def test_part2(input_data):
    assert part2(input_data[0]) == 167737115857
Example #3
0
def test_part2(puzzle_input, answer):
    rules, ticket, nearby = parse_input(puzzle_input)
    assert part2(rules, ticket, nearby) == answer
Example #4
0
def test_day16_part2():
    assert day16.part2('03036732577212944063491565474664', 100) == '84462026'
    assert day16.part2('02935109699940807407585447034323', 100) == '78725270'
    assert day16.part2('03081770884921959731165446850517', 100) == '53553731'
Example #5
0
 def test_part2_input(self):
     final_reg0 = day16.part2(aoc.read_input('day16.input'))
     self.assertEqual(final_reg0, 472)
Example #6
0
 def test_part2_example3(self):
     result = day16.part2(["03081770884921959731165446850517"])
     self.assertEqual("53553731", result)
Example #7
0
 def test_part2_input(self):
     result = day16.part2(aoc.read_input('day16.input'))
     self.assertEqual('19903864', result)
Example #8
0
 def test_part2_example2(self):
     result = day16.part2(["02935109699940807407585447034323"])
     self.assertEqual("78725270", result)
Example #9
0
 def test_part2_example1(self):
     result = day16.part2(["03036732577212944063491565474664"])
     self.assertEqual("84462026", result)
def test_16_2_examples():
    examples = []
    for (inp, out) in examples:
        assert out == day16.part2(inp)
Example #11
0
def test_complex():
    assert day16.part2("03036732577212944063491565474664") == "84462026"
    assert day16.part2("02935109699940807407585447034323") == "78725270"
    assert day16.part2("03081770884921959731165446850517") == "53553731"
Example #12
0
def test_part2_input(input_data):
    assert part2(input_data) == 1909224687553