Skip to content

Commit

Permalink
Simplify test_calculator.py code
Browse files Browse the repository at this point in the history
  • Loading branch information
martinholmer committed Dec 16, 2024
1 parent 567eb3f commit 52bd4e6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions taxcalc/tests/test_calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ def test_make_calculator_with_policy_reform(cps_subsample):
assert calc.current_year == year
assert calc.policy_param('II_em') == 4000
assert np.allclose(calc.policy_param('_II_em'),
np.array([4000] * Policy.number_of_years()))
np.array([4000] * pol.num_years))
exp_STD_Aged = [[1600, 1300, 1300,
1600, 1600]] * Policy.number_of_years()
1600, 1600]] * pol.num_years
assert np.allclose(calc.policy_param('_STD_Aged'),
np.array(exp_STD_Aged))
assert np.allclose(calc.policy_param('STD_Aged'),
Expand All @@ -102,7 +102,7 @@ def test_make_calculator_with_multiyear_reform(cps_subsample):
# check that Policy object embedded in Calculator object is correct
assert calc.current_year == year
assert calc.policy_param('II_em') == 3950
exp_II_em = [3900, 3950, 5000] + [6000] * (Policy.number_of_years() - 3)
exp_II_em = [3900, 3950, 5000] + [6000] * (pol.num_years - 3)
assert np.allclose(calc.policy_param('_II_em'),
np.array(exp_II_em))
calc.increment_year()
Expand Down

0 comments on commit 52bd4e6

Please sign in to comment.