day 1 - part 1 - refactoring

This commit is contained in:
Stanislas Jouffroy 2024-12-02 11:16:39 +01:00
parent 42f3bcc63e
commit b844fafd78
4 changed files with 16 additions and 20 deletions

View file

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

View file

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