From 7d1b84842ec11f98f0d6a261d25d94a14008e5a0 Mon Sep 17 00:00:00 2001 From: jdebacker Date: Thu, 23 May 2024 09:43:14 -0400 Subject: [PATCH 1/2] update tests for full coverage --- ccc/tests/test_get_taxcalc_rates.py | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/ccc/tests/test_get_taxcalc_rates.py b/ccc/tests/test_get_taxcalc_rates.py index 4645e64d..668a74c5 100644 --- a/ccc/tests/test_get_taxcalc_rates.py +++ b/ccc/tests/test_get_taxcalc_rates.py @@ -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 From 4a0ec23475e7301108f2a862d69cec6595426886 Mon Sep 17 00:00:00 2001 From: jdebacker Date: Thu, 23 May 2024 14:00:26 -0400 Subject: [PATCH 2/2] try to catch one more line --- ccc/tests/test_get_taxcalc_rates.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccc/tests/test_get_taxcalc_rates.py b/ccc/tests/test_get_taxcalc_rates.py index 668a74c5..75af0383 100644 --- a/ccc/tests/test_get_taxcalc_rates.py +++ b/ccc/tests/test_get_taxcalc_rates.py @@ -7,7 +7,7 @@ @pytest.mark.parametrize( "baseline", - [(True), (False, None)], + [(True), (False)], ids=["baseline", "reform"], ) def test_get_calculator_cps(baseline):