Skip to content
Merged
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/remove-stale-xfail-1968.changed.md
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion policyengine_uk/tests/test_ni_threshold_freeze.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 4 additions & 15 deletions policyengine_uk/tests/test_threshold_indexation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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(
Expand Down
Loading