day 1 - part 2

This commit is contained in:
Stanislas Jouffroy 2024-12-02 16:16:06 +01:00
parent b844fafd78
commit 5f492b3f66
6 changed files with 99 additions and 22 deletions

View file

@ -0,0 +1,14 @@
from pathlib import Path
from day1 import part2
def test_compute_similarity_score():
dict1 = {1: 1, 2: 1, 3: 3, 4: 1}
dict2 = {3: 3, 4: 1, 5: 1, 9: 1}
assert part2.compute_similarity_score(dict1, dict2) == 31
def test_main():
test_file = Path(__file__).parent / "test-data"
assert part2.main(test_file) == 31