Implement 2024 day 12

This commit is contained in:
2024-12-12 22:18:32 +01:00
parent 8308580284
commit 044c971d00
5 changed files with 141 additions and 0 deletions

21
2024/tests/test_day12.py Normal file
View File

@@ -0,0 +1,21 @@
import pytest
from aoc.days.day12 import DayRunner
from . import get_data
@pytest.mark.parametrize(
"data,result",
[(get_data(12, 1), 140), (get_data(12, 2), 772), (get_data(12, 3), 1930)],
)
def test_sample_part1(data: str, result: int) -> None:
assert DayRunner.part1(data) == result
@pytest.mark.parametrize(
"data,result",
[(get_data(12, 1), 80), (get_data(12, 2), 436), (get_data(12, 3), 1206)],
)
def test_sample_part2(data: str, result: int) -> None:
assert DayRunner.part2(data) == result