Skip to content

Commit

Permalink
update tests for full coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
jdebacker committed May 23, 2024
1 parent 590ca3a commit 7d1b848
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, None)],
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 7d1b848

Please sign in to comment.