diff --git a/changelog.d/remove-stale-xfail-1968.changed.md b/changelog.d/remove-stale-xfail-1968.changed.md new file mode 100644 index 000000000..8c89b101f --- /dev/null +++ b/changelog.d/remove-stale-xfail-1968.changed.md @@ -0,0 +1 @@ +- Removed the stale non-strict expected failure for the 2023-24 Class 4 lower profits limit (#1968, fixed by #2058), so the alignment test now asserts that year. diff --git a/policyengine_uk/tests/test_ni_threshold_freeze.py b/policyengine_uk/tests/test_ni_threshold_freeze.py index 0403c9213..43cceb371 100644 --- a/policyengine_uk/tests/test_ni_threshold_freeze.py +++ b/policyengine_uk/tests/test_ni_threshold_freeze.py @@ -26,7 +26,7 @@ 4. Alignment, in test_threshold_indexation.py: the UEL and UPL with the higher rate threshold in every year 2021-2040, and the PT and LPL with the personal allowance from 2023. The 2021-22 and 2022-23 lower thresholds - are intended exceptions, and the 2023-24 LPL is #1968. + are intended exceptions. 5. No cash cuts: no threshold falls from one year to the next, 2026-2040. 6. Differential: for any earnings or profits >= 0 in 2026-2030, primary and additional Class 1, secondary Class 1 and Class 4 equal an exact-rational diff --git a/policyengine_uk/tests/test_threshold_indexation.py b/policyengine_uk/tests/test_threshold_indexation.py index 01d5396e0..23211c996 100644 --- a/policyengine_uk/tests/test_threshold_indexation.py +++ b/policyengine_uk/tests/test_threshold_indexation.py @@ -35,8 +35,7 @@ £0.26 of the UPL. From 2023: LPL = PA and 52 x PT is within £0.26 of the LPL. Intended exceptions, as the law stood: in 2021-22 the PT and LPL were £9,568 a year, below the PA; in 2022-23 the PT rose to the PA only - from 6 July 2022 and the LPL was £11,908 for the whole year. The model's - 2023-24 LPL (£11,908, not £12,570) is #1968. + from 6 July 2022 and the LPL was £11,908 for the whole year. 6. Secondary threshold: from 2031, ST(Y) = ST(Y-1) x (1 + g_Y). 7. For any freeze end and September CPI path (function level): values up to each parameter's last stated year are unchanged; after it, each NICs @@ -322,19 +321,9 @@ def test_upper_thresholds_align_with_the_higher_rate_threshold(system, year): ) -@pytest.mark.parametrize( - "year", - [ - pytest.param( - 2023, - marks=pytest.mark.xfail( - reason="#1968: the model's 2023-24 LPL is £11,908, not £12,570", - strict=False, - ), - ), - *range(2024, 2041), - ], -) +# 2023-24 is the first aligned year: NICA 2022 s2 set the LPL to £12,570 +# from 6 April 2023 (#1968, fixed by #2058). +@pytest.mark.parametrize("year", range(2023, 2041)) def test_lower_thresholds_align_with_the_personal_allowance(system, year): values = thresholds(system, year) assert values["lower_profits_limit"] == pytest.approx(