Skip to content

Commit d97236d

Browse files
vahid-ahmadiclaude
andcommitted
Add comprehensive YAML tests for Scottish Child Payment changes
Tests verify: - 2025 amount (£27.15/week) - CTC no longer qualifies from 2025 (after April 2024 removal) - CTC still qualifies in 2023 (before removal) - WTC no longer qualifies from 2025 - Income Support still qualifies in 2025 - JSA (income-based) still qualifies in 2025 - ESA (income-related) still qualifies in 2025 - Pension Credit still qualifies in 2025 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 939d90d commit d97236d

1 file changed

Lines changed: 181 additions & 4 deletions

File tree

policyengine_uk/tests/policy/baseline/gov/social_security_scotland/scottish_child_payment.yaml

Lines changed: 181 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@
131131
# Only child_young (age 4) eligible, £20/week * 52 = £1,040
132132
scottish_child_payment: 1040
133133

134-
- name: SCP for family receiving Child Tax Credit
135-
period: 2024
134+
- name: SCP for family receiving Child Tax Credit (2023 - CTC still qualifies)
135+
period: 2023
136136
absolute_error_margin: 10
137137
input:
138138
people:
@@ -149,8 +149,8 @@
149149
members: [parent, child_1]
150150
region: SCOTLAND
151151
output:
152-
# £26.70/week * 52 weeks * 1 child = £1,388.40
153-
scottish_child_payment: 1388
152+
# £25/week * 52 weeks * 1 child = £1,300
153+
scottish_child_payment: 1300
154154

155155
- name: No SCP before Feb 2021
156156
period: 2020
@@ -218,3 +218,180 @@
218218
output:
219219
# £26.70/week * 52 weeks * 4 children = £5,553.60
220220
scottish_child_payment: 5554
221+
222+
# New tests for 2025 amount and qualifying benefit changes
223+
224+
- name: SCP with 2025 amount (£27.15/week)
225+
period: 2025
226+
absolute_error_margin: 10
227+
input:
228+
people:
229+
parent:
230+
age: 30
231+
child_1:
232+
age: 5
233+
benunits:
234+
benunit:
235+
members: [parent, child_1]
236+
universal_credit: 5000
237+
households:
238+
household:
239+
members: [parent, child_1]
240+
region: SCOTLAND
241+
output:
242+
# £27.15/week * 52 weeks * 1 child = £1,411.80
243+
scottish_child_payment: 1412
244+
245+
- name: CTC no longer qualifies from 2025 (after April 2024)
246+
period: 2025
247+
absolute_error_margin: 1
248+
input:
249+
people:
250+
parent:
251+
age: 30
252+
child_1:
253+
age: 8
254+
benunits:
255+
benunit:
256+
members: [parent, child_1]
257+
child_tax_credit: 2000
258+
universal_credit: 0
259+
households:
260+
household:
261+
members: [parent, child_1]
262+
region: SCOTLAND
263+
output:
264+
# CTC removed as qualifying benefit from April 2024
265+
scottish_child_payment: 0
266+
267+
- name: CTC still qualifies in 2023 (before April 2024)
268+
period: 2023
269+
absolute_error_margin: 10
270+
input:
271+
people:
272+
parent:
273+
age: 30
274+
child_1:
275+
age: 8
276+
benunits:
277+
benunit:
278+
members: [parent, child_1]
279+
child_tax_credit: 2000
280+
universal_credit: 0
281+
households:
282+
household:
283+
members: [parent, child_1]
284+
region: SCOTLAND
285+
output:
286+
# £25/week * 52 weeks * 1 child = £1,300
287+
scottish_child_payment: 1300
288+
289+
- name: WTC no longer qualifies from 2025
290+
period: 2025
291+
absolute_error_margin: 1
292+
input:
293+
people:
294+
parent:
295+
age: 30
296+
child_1:
297+
age: 8
298+
benunits:
299+
benunit:
300+
members: [parent, child_1]
301+
working_tax_credit: 2000
302+
universal_credit: 0
303+
households:
304+
household:
305+
members: [parent, child_1]
306+
region: SCOTLAND
307+
output:
308+
# WTC removed as qualifying benefit from April 2024
309+
scottish_child_payment: 0
310+
311+
- name: Income Support still qualifies in 2025
312+
period: 2025
313+
absolute_error_margin: 10
314+
input:
315+
people:
316+
parent:
317+
age: 30
318+
child_1:
319+
age: 5
320+
benunits:
321+
benunit:
322+
members: [parent, child_1]
323+
income_support: 3000
324+
universal_credit: 0
325+
households:
326+
household:
327+
members: [parent, child_1]
328+
region: SCOTLAND
329+
output:
330+
# £27.15/week * 52 weeks * 1 child = £1,411.80
331+
scottish_child_payment: 1412
332+
333+
- name: JSA income-based still qualifies in 2025
334+
period: 2025
335+
absolute_error_margin: 10
336+
input:
337+
people:
338+
parent:
339+
age: 30
340+
child_1:
341+
age: 5
342+
benunits:
343+
benunit:
344+
members: [parent, child_1]
345+
jsa_income: 3000
346+
universal_credit: 0
347+
households:
348+
household:
349+
members: [parent, child_1]
350+
region: SCOTLAND
351+
output:
352+
# £27.15/week * 52 weeks * 1 child = £1,411.80
353+
scottish_child_payment: 1412
354+
355+
- name: ESA income-related still qualifies in 2025
356+
period: 2025
357+
absolute_error_margin: 10
358+
input:
359+
people:
360+
parent:
361+
age: 30
362+
child_1:
363+
age: 5
364+
benunits:
365+
benunit:
366+
members: [parent, child_1]
367+
esa_income: 4000
368+
universal_credit: 0
369+
households:
370+
household:
371+
members: [parent, child_1]
372+
region: SCOTLAND
373+
output:
374+
# £27.15/week * 52 weeks * 1 child = £1,411.80
375+
scottish_child_payment: 1412
376+
377+
- name: Pension Credit still qualifies in 2025
378+
period: 2025
379+
absolute_error_margin: 10
380+
input:
381+
people:
382+
grandparent:
383+
age: 70
384+
child_1:
385+
age: 10
386+
benunits:
387+
benunit:
388+
members: [grandparent, child_1]
389+
pension_credit: 5000
390+
universal_credit: 0
391+
households:
392+
household:
393+
members: [grandparent, child_1]
394+
region: SCOTLAND
395+
output:
396+
# £27.15/week * 52 weeks * 1 child = £1,411.80
397+
scottish_child_payment: 1412

0 commit comments

Comments
 (0)