day 1 - part 2
This commit is contained in:
parent
b844fafd78
commit
5f492b3f66
6 changed files with 99 additions and 22 deletions
|
@ -2,13 +2,13 @@ from pathlib import Path
|
|||
|
||||
from day1 import part1
|
||||
|
||||
TEST_FILE = Path(__file__).parent / "test-data"
|
||||
|
||||
def test_compute_distance():
|
||||
list1 = [1, 2, 3, 3, 3, 4]
|
||||
list2 = [3, 3, 3, 4, 5, 9]
|
||||
assert part1.compute_distance(list1, list2) == 11
|
||||
|
||||
|
||||
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]
|
||||
def test_main():
|
||||
test_file = Path(__file__).parent / "test-data"
|
||||
assert part1.main(test_file) == 11
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue