def test_part_2_plus(): assert solution.chines([3, 1, 6], [5, 7, 8]) == 78 assert solution.chines([2, 3, 2], [3, 4, 5]) == 47 assert solution.part_2((None, "17,x,13,19".split(","))) == 3417 assert solution.part_2((None, "67,7,59,61".split(","))) == 754018 assert solution.part_2((None, "67,x,7,59,61".split(","))) == 779210 assert solution.part_2((None, "67,7,x,59,61".split(","))) == 1261476 assert solution.part_2((None, "1789,37,47,1889".split(","))) == 1202161486
def test_part_2(file: Path, expected): if expected is None: return lines = file.read_text().splitlines() result = solution.part_2(solution.parse(lines)) assert result == expected
def test_part_2(): entries = [ 1721, 979, 366, 299, 675, 1456, ] assert part_2(entries) == 241861950
def test_part_2(): m = machine.Machine.from_file("test_input.txt") assert solution.part_2(m) == 8
def test_part_2(file: Path, expected): print() lines = file.read_text().splitlines() result = solution.part_2(solution.parse(lines)) assert result == expected
def test_prevent_loop(): print() solution.part_2(([43, 19], [2, 29, 14]))
def test_part_2(password_list): assert part_2(password_list) == 1
def test_part_2(data, expect): assert solution.part_2(data) == expect