day 1 - part 1

This commit is contained in:
Stanislas Jouffroy 2024-12-02 11:14:30 +01:00
parent bbd0702bf7
commit 4bdbcdbb56
4 changed files with 48 additions and 5 deletions

View file

@ -0,0 +1,6 @@
3 4
4 3
2 5
1 3
3 9
3 3

View file

@ -0,0 +1,14 @@
from pathlib import Path
from day1 import first
TEST_FILE = Path(__file__).parent / "first-data"
def test_first():
assert first.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]