Skip to content

Commit

Permalink
Merge pull request #390 from jdebacker/test_cover
Browse files Browse the repository at this point in the history
Update tests
  • Loading branch information
jdebacker authored May 23, 2024
2 parents 590ca3a + 4a0ec23 commit e825006
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions ccc/tests/test_get_taxcalc_rates.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,26 @@
from ccc.utils import TC_LAST_YEAR


def test_get_calculator_cps():
@pytest.mark.parametrize(
"baseline",
[(True), (False)],
ids=["baseline", "reform"],
)
def test_get_calculator_cps(baseline):
"""
Test the get_calculator() function
"""
calc1 = tc.get_calculator(True, 2019)
calc1 = tc.get_calculator(
baseline,
2019,
baseline_policy={"FICA_ss_trt": {2018: 0.15}},
reform={"FICA_ss_trt": {2018: 0.125}},
)
assert calc1.current_year == 2019
if baseline:
assert calc1.policy_param("FICA_ss_trt") == 0.15
else:
assert calc1.policy_param("FICA_ss_trt") == 0.125


@pytest.mark.needs_puf
Expand Down

0 comments on commit e825006

Please sign in to comment.