Restructure tests

This commit is contained in:
2024-12-08 10:32:08 +01:00
parent dfee3d4e11
commit dcb0f4514d
12 changed files with 63 additions and 91 deletions

20
2024/tests/test_day02.py Normal file
View File

@@ -0,0 +1,20 @@
from aoc.days.day2 import DayRunner, is_savable
from . import get_data
def test_individual_samples() -> None:
assert is_savable("7 6 4 2 1")
assert not is_savable("1 2 7 8 9")
assert not is_savable("9 7 6 2 1")
assert is_savable("1 3 2 4 5")
assert is_savable("8 6 4 4 1")
assert is_savable("1 3 6 7 9")
def test_sample_part1() -> None:
assert DayRunner.part1(get_data(2)) == 2
def test_sample_part2() -> None:
assert DayRunner.part2(get_data(2)) == 4