advent_of_code/15/2/test_day2.py
2025-12-02 07:55:08 -06:00

28 lines
923 B
Python

import pytest
from main import get_slack_amount, get_surface_area, get_ribbon_amount
@pytest.mark.parametrize('l, w, h, expected',
[
(2, 3, 4, 52),
(1, 1, 10, 42)
])
def test_surface_area(l, w, h, expected):
assert get_surface_area(l, w, h) == expected
@pytest.mark.parametrize('l, w, h, expected',
[
(2, 3, 4, 6),
(1, 1, 10, 1)
])
def test_slack_amount(l, w, h, expected):
assert get_slack_amount(l, w, h) == expected
@pytest.mark.parametrize('l, w, h, expected',
[
(2, 3, 4, 34),
(1, 1, 10, 14)
])
def test_ribbon_amount(l, w, h, expected):
assert get_ribbon_amount(l, w, h) == expected