# Copyright (c) 2026 Krzysztof Rudnicki. MIT licence. """Polish agreement in the reply, split out of test_analytics_command. Three forms, not two, and the rule reads the last *two* digits -- so 12, 13 and 14 take the many-form while 22, 23 and 24 do not. Getting this wrong is the kind of thing the group notices immediately and mentions every time. """ from __future__ import annotations import pytest from signal_bot.analytics import render @pytest.mark.parametrize( ("count", "expected"), [(1, "1 raz"), (2, "2 razy"), (5, "5 razy"), (12, "12 razy"), (22, "22 razy")], ) def test_polish_agreement_on_counts(count: int, expected: str) -> None: """Twelve takes the many-form and twenty-two does not.""" assert render.times_phrase(count) == expected @pytest.mark.parametrize( ("count", "expected"), [(1, "1 dzieƄ"), (2, "2 dni"), (5, "5 dni"), (12, "12 dni")], ) def test_polish_agreement_on_days(count: int, expected: str) -> None: assert render.days_phrase(count) == expected