import re import pytest from aoc import input_file from main import EXAMPLE_BASE @pytest.fixture def example_data(request): match = re.match(r"^.*year_(\d{4})/day_(\d{2})\.py$", str(request.fspath)) assert match is not None year, day = list(map(int, match.groups())) return input_file.get(year, day, EXAMPLE_BASE)