Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/778.md
Original file line number Diff line number Diff line change
@@ -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.
99 changes: 99 additions & 0 deletions policyengine_uk/tests/policy/integration/entitledto_scenarios.yaml
Original file line number Diff line number Diff line change
@@ -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