feat: initial commit
This commit is contained in:
15
conftest.py
Normal file
15
conftest.py
Normal file
@@ -0,0 +1,15 @@
|
||||
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)
|
||||
Reference in New Issue
Block a user