diff --git a/changelog.d/778.md b/changelog.d/778.md new file mode 100644 index 000000000..66418daf9 --- /dev/null +++ b/changelog.d/778.md @@ -0,0 +1 @@ +- Add three worked benefit scenarios at `policyengine_uk/tests/policy/integration/entitledto_scenarios.yaml` as a first batch of EntitledTo-style regression tests (single low-earner private renter, couple with two children in social housing, pensioner couple on the Pension Credit guarantee), seeding the ~20-scenario coverage suggested in #778. diff --git a/policyengine_uk/tests/policy/integration/entitledto_scenarios.yaml b/policyengine_uk/tests/policy/integration/entitledto_scenarios.yaml new file mode 100644 index 000000000..40bddabb5 --- /dev/null +++ b/policyengine_uk/tests/policy/integration/entitledto_scenarios.yaml @@ -0,0 +1,99 @@ +# Worked benefit scenarios for cross-checking against EntitledTo +# (https://www.entitledto.co.uk/), tracked in issue #778. +# +# These are pinned to PolicyEngine's current outputs and serve as +# regression tests rather than authoritative EntitledTo matches: the +# numbers were generated by running each scenario through PolicyEngine +# at the time the file was added. Future work is to manually run the +# matching cases through EntitledTo and tighten any rows where the two +# disagree, ratcheting up to the ~20-scenario coverage suggested in #778. + +- name: "EntitledTo #1 - single 30yo working part-time at low pay, private renter in London" + period: 2025 + absolute_error_margin: 1 + input: + people: + adult: + age: 30 + employment_income: 12_000 + benunits: + benunit: + members: [adult] + households: + household: + members: [adult] + rent: 8_000 + council_tax: 1_200 + region: LONDON + country: ENGLAND + tenure_type: RENT_PRIVATELY + output: + income_tax: 0 + national_insurance: 0 + universal_credit: 3_662.72 + housing_benefit: 0 + child_benefit: 0 + household_net_income: 14_303.68 + +- name: "EntitledTo #2 - couple with 2 children, one earner at £22k, social housing in North West" + period: 2025 + absolute_error_margin: 1 + input: + people: + adult_1: + age: 35 + employment_income: 22_000 + adult_2: + age: 35 + child_1: + age: 5 + child_2: + age: 3 + benunits: + benunit: + members: [adult_1, adult_2, child_1, child_2] + households: + household: + members: [adult_1, adult_2, child_1, child_2] + rent: 6_000 + council_tax: 1_500 + region: NORTH_WEST + country: ENGLAND + tenure_type: RENT_FROM_COUNCIL + output: + # Household-level aggregates only — per-person income_tax / NI can't be + # asserted with a single scalar when multiple people are in the benunit. + household_tax: 4_047.45 + universal_credit: 12_490.86 + housing_benefit: 0 + child_benefit: 2_251.60 + household_net_income: 36_130.40 + +- name: "EntitledTo #3 - pensioner couple, low state pension, qualifies for Pension Credit" + period: 2025 + absolute_error_margin: 1 + input: + people: + pensioner_1: + age: 70 + state_pension: 8_000 + pensioner_2: + age: 68 + state_pension: 6_000 + benunits: + benunit: + members: [pensioner_1, pensioner_2] + households: + household: + members: [pensioner_1, pensioner_2] + region: WEST_MIDLANDS + country: ENGLAND + council_tax: 1_800 + output: + universal_credit: 0 + housing_benefit: 0 + pension_credit: 3_607.72 + winter_fuel_allowance: 200 + income_tax: 0 + national_insurance: 0 + household_net_income: 15_848.68