diff --git a/2024/day1/first.py b/2024/day1/part1.py similarity index 93% rename from 2024/day1/first.py rename to 2024/day1/part1.py index ecf9a8e..839e4ed 100644 --- a/2024/day1/first.py +++ b/2024/day1/part1.py @@ -21,7 +21,7 @@ def compute(data_file: Path) -> int: def main(): - file = Path(__file__).parent / "first-input" + file = Path(__file__).parent / "input-data" print(compute(file)) diff --git a/tests/2024/day1/first-data b/tests/2024/day1/test-data similarity index 100% rename from tests/2024/day1/first-data rename to tests/2024/day1/test-data diff --git a/tests/2024/day1/test_first.py b/tests/2024/day1/test_first.py index 7f13fd8..90c0408 100644 --- a/tests/2024/day1/test_first.py +++ b/tests/2024/day1/test_first.py @@ -1,14 +1,14 @@ from pathlib import Path -from day1 import first +from day1 import part1 -TEST_FILE = Path(__file__).parent / "first-data" +TEST_FILE = Path(__file__).parent / "test-data" def test_first(): - assert first.compute(TEST_FILE) == 11 + assert part1.compute(TEST_FILE) == 11 def test_get_lists(): - assert first.get_ordered_lists(TEST_FILE)[0] == [1, 2, 3, 3, 3, 4] - assert first.get_ordered_lists(TEST_FILE)[1] == [3, 3, 3, 4, 5, 9] + assert part1.get_ordered_lists(TEST_FILE)[0] == [1, 2, 3, 3, 3, 4] + assert part1.get_ordered_lists(TEST_FILE)[1] == [3, 3, 3, 4, 5, 9]