Initial commit: event-driven UK payslip ingest service
Extracted from /home/wizard/code monorepo into its own repo so Woodpecker CI can watch it. Identical content to /home/wizard/code commit e426028. See README.md for overview, env vars, and Paperless workflow config. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
commit
57484619c1
27 changed files with 2878 additions and 0 deletions
22
tests/test_tax_year.py
Normal file
22
tests/test_tax_year.py
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
from datetime import date
|
||||
|
||||
import pytest
|
||||
|
||||
from payslip_ingest.tax_year import derive_tax_year
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
("pay_date", "expected"),
|
||||
[
|
||||
(date(2025, 4, 5), "2024/25"),
|
||||
(date(2025, 4, 6), "2025/26"),
|
||||
(date(2026, 4, 5), "2025/26"),
|
||||
(date(2026, 4, 6), "2026/27"),
|
||||
(date(2026, 12, 31), "2026/27"),
|
||||
(date(2027, 1, 1), "2026/27"),
|
||||
(date(2027, 4, 5), "2026/27"),
|
||||
(date(2027, 4, 6), "2027/28"),
|
||||
],
|
||||
)
|
||||
def test_derive_tax_year(pay_date: date, expected: str) -> None:
|
||||
assert derive_tax_year(pay_date) == expected
|
||||
Loading…
Add table
Add a link
Reference in a new issue