Skip to content

Commit 735b98d

Browse files
authored
Merge pull request #1541 from PolicyEngine/codex/clarify-reform-impact-sources
Clarify reform impact regression fixtures
2 parents bc59ba9 + 2937fa7 commit 735b98d

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

policyengine_uk/tests/microsimulation/reforms_config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Regression fixtures for microsimulation reform impacts.
2+
# These expected impacts are derived from current model output and are used to
3+
# catch unintended behavior changes. They are not external fiscal estimates
4+
# unless a reform entry is explicitly annotated otherwise.
15
reforms:
26
- name: Raise basic rate by 1pp
37
expected_impact: 7.8

policyengine_uk/tests/microsimulation/test_reform_impacts.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
"""
22
Test suite for PolicyEngine UK reform fiscal impacts.
33
This file tests that model changes don't unexpectedly change reform impacts.
4+
Expected impacts come from the repo's current-model regression fixtures in
5+
reforms_config.yaml, not from external policy costings unless noted there.
46
"""
57

68
import pytest
@@ -61,7 +63,7 @@ def get_fiscal_impact(baseline, reform: dict) -> float:
6163
def test_reform_fiscal_impacts(
6264
baseline, reform, reform_name, expected_impact, tolerance
6365
):
64-
"""Test that each reform produces the expected fiscal impact."""
66+
"""Test that each reform still matches its current-model regression target."""
6567
impact = get_fiscal_impact(baseline, reform)
6668

6769
assert abs(impact - expected_impact) < tolerance, (

0 commit comments

Comments
 (0)