diff --git a/changelog.d/opt30-test-binary-drift.fixed.md b/changelog.d/opt30-test-binary-drift.fixed.md new file mode 100644 index 00000000..55739a22 --- /dev/null +++ b/changelog.d/opt30-test-binary-drift.fixed.md @@ -0,0 +1 @@ +Mark the opt30 rebate-timing test xfail while NBER clarifies a taxsim-latest behavior change (VA 2021 rebate no longer booked in the eligible year under opt 30; taxsim #1089); keep asserting the flag plumbing. diff --git a/tests/test_taxsim_opt30.py b/tests/test_taxsim_opt30.py index 7ccb164b..5ca8de7a 100644 --- a/tests/test_taxsim_opt30.py +++ b/tests/test_taxsim_opt30.py @@ -11,6 +11,7 @@ import io import pandas as pd +import pytest from click.testing import CliRunner from policyengine_taxsim.cli import cli @@ -36,6 +37,18 @@ def _run_compare(tmp_path, extra_args): return result.output, taxsim, pe +def test_opt30_flag_reaches_binary(tmp_path): + """--taxsim-opt30 must set opt(30)=1 on the TAXSIM run.""" + output, _, _ = _run_compare(tmp_path, ["--taxsim-opt30"]) + assert "opt(30)=1" in output + + +@pytest.mark.xfail( + reason="taxsim-latest stopped booking the VA 2021 rebate in the eligible " + "year under opt(30) around 2026-07-08 (now siitax=2568.05, srebate=0); " + "awaiting NBER clarification in taxsim #1089", + strict=False, +) def test_opt30_aligns_rebate_timing(tmp_path): """With --taxsim-opt30 the binary books VA's 2021-liability rebate in 2021 (like PolicyEngine), so the two engines agree exactly."""