Skip to content

Commit 22e234c

Browse files
committed
Added test to check simulation with cliffs
1 parent d0c0d69 commit 22e234c

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tests/country/test_us.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,23 @@ def test_us_macro_comparison():
2121
)
2222

2323
sim.calculate_economy_comparison()
24+
25+
def test_us_macro_cliff_impacts():
26+
from policyengine import Simulation
27+
28+
sim = Simulation(
29+
scope="macro",
30+
country="us",
31+
reform={
32+
"gov.usda.snap.income.deductions.earned_income": {"2025": 0.05}
33+
},
34+
include_cliffs=True
35+
)
36+
37+
result = sim.calculate_economy_comparison()
38+
cliff_impact = result.model_dump().get('cliff_impact')
39+
40+
assert cliff_impact is not None, "Expected 'cliff_impact' to be present in the output."
41+
42+
assert cliff_impact["baseline"]["cliff_gap"] > 0
43+
assert cliff_impact["reform"]["cliff_share"] > 0

0 commit comments

Comments
 (0)