Restructure tests

This commit is contained in:
2024-12-08 10:32:08 +01:00
parent dfee3d4e11
commit dcb0f4514d
12 changed files with 63 additions and 91 deletions

View File

@@ -0,0 +1,8 @@
import os
def get_data(day: int, sub: int | None = None) -> str:
basename = f"{day:02d}" if sub is None else f"{day:02d}.{sub}"
sample = os.path.dirname(__file__) + f"/samples/{basename}.txt"
with open(sample, mode="rt", encoding="utf-8") as f:
return f.read()