Skip to content

Commit 60f0cd6

Browse files
committed
Download test input to tests/data/
1 parent f03d05e commit 60f0cd6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

aoc/models/file.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,10 @@ def add_test_input(day: int, part_num: int) -> None:
213213
part_num (int): The puzzle part number (1 or 2).
214214
215215
Note:
216-
Creates file at: `data/dayXX/test_XX_input.txt`
216+
Creates file at: `tests/data/dayXX/test_XX_input.txt`
217217
"""
218218
path = File.get_path()
219-
folder = os.path.realpath(f"{path}/data/day{day:02}")
219+
folder = os.path.realpath(f"{path}/tests/data/day{day:02}")
220220
folder_path = Path(folder)
221221
if not folder_path.exists():
222222
folder_path.mkdir(parents=True, exist_ok=True)

aoc/models/reader.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ def get_test_input(day: int, is_raw: bool, part_num: int) -> List[str]:
6262
List[str]: List of test input lines, processed according to `is_raw` flag.
6363
6464
Note:
65-
Expects input file at: `data/dayXX/test_YY_input.txt`
65+
Expects input file at: `tests/data/dayXX/test_YY_input.txt`
6666
where `XX` is the zero-padded day number and `YY` is the zero-padded part number.
6767
"""
68-
file_path = os.path.join(Reader.PROJECT_ROOT, f"data/day{day:02d}/test_{part_num:02d}_input.txt")
68+
file_path = os.path.join(Reader.PROJECT_ROOT, f"tests/data/day{day:02d}/test_{part_num:02d}_input.txt")
6969
with open(file_path, "r") as file:
7070
return [line.strip("\n") if is_raw else line.strip() for line in file.readlines()]

0 commit comments

Comments
 (0)