day 1 - part 2
This commit is contained in:
parent
b844fafd78
commit
5f492b3f66
6 changed files with 99 additions and 22 deletions
15
tests/2024/day1/test_common.py
Normal file
15
tests/2024/day1/test_common.py
Normal file
|
@ -0,0 +1,15 @@
|
|||
from pathlib import Path
|
||||
|
||||
from day1 import common
|
||||
|
||||
TEST_FILE = Path(__file__).parent / "test-data"
|
||||
|
||||
|
||||
def test_get_lists():
|
||||
assert common.get_lists(TEST_FILE)[0] == [3, 4, 2, 1, 3, 3]
|
||||
assert common.get_lists(TEST_FILE)[1] == [4, 3, 5, 3, 9, 3]
|
||||
|
||||
|
||||
def test_get_sorted_lists():
|
||||
assert common.get_ordered_lists(TEST_FILE)[0] == [1, 2, 3, 3, 3, 4]
|
||||
assert common.get_ordered_lists(TEST_FILE)[1] == [3, 3, 3, 4, 5, 9]
|
Loading…
Add table
Add a link
Reference in a new issue