def test_step(): """ Test """ states = read_tests("day24_tests.txt") bugs = _parse_bugs(states[0]) for lines in states[1:]: expected_bugs = _parse_bugs(lines) bugs = _step(bugs) assert bugs == expected_bugs
def test_step_recursive(): """ Test """ lines = read_tests("day24_tests.txt")[0] bugs = _parse_bugs_recursive(lines) for _ in range(10): bugs = _step_recursive(bugs) print(len(bugs)) _print_recursive(bugs) assert len(bugs) == 99
def tests(): """ Test fixture """ return read_tests("day14_tests.txt")
def tests(): """ Fixture """ return read_tests("day22_tests.txt")
def test_first_repeat(): """ Test """ lines = read_tests("day24_tests.txt")[0] assert find_first_repeat(lines) == 2129920