<filename>aoc_cqkh42/year_2020/tests/test_day_15.py
import pytest

from aoc_cqkh42.year_2020 import day_15


@pytest.mark.parametrize(
    'data, answer',
    [
        ('1,3,2', 1),
        ('2,1,3', 10),
        ('1,2,3', 27),
        ('2,3,1', 78),
        ('3,2,1', 438),
        ('3,1,2', 1836),
        ('0,3,6', 436)
    ]
)
def test_part_a(data, answer):
    assert day_15.part_a(data) == answer


@pytest.mark.parametrize(
    'data, answer',
    [
        ('1,3,2', 2578),
        ('2,1,3', 3544142),
        ('1,2,3', 261214),
        ('2,3,1', 6895259),
        ('3,2,1', 18),
        ('3,1,2', 362),
        ('0,3,6', 175594)
    ]
)
def test_part_b(data, answer):
    assert day_15.part_b(data) == answer
<filename>aoc_cqkh42/year_2020/tests/test_day_15.py
import pytest

from aoc_cqkh42.year_2020 import day_15


@pytest.mark.parametrize(
    'data, answer',
    [
        ('1,3,2', 1),
        ('2,1,3', 10),
        ('1,2,3', 27),
        ('2,3,1', 78),
        ('3,2,1', 438),
        ('3,1,2', 1836),
        ('0,3,6', 436)
    ]
)
def test_part_a(data, answer):
    assert day_15.part_a(data) == answer


@pytest.mark.parametrize(
    'data, answer',
    [
        ('1,3,2', 2578),
        ('2,1,3', 3544142),
        ('1,2,3', 261214),
        ('2,3,1', 6895259),
        ('3,2,1', 18),
        ('3,1,2', 362),
        ('0,3,6', 175594)
    ]
)
def test_part_b(data, answer):
    assert day_15.part_b(data) == answer