Skip to content

Commit

Permalink
add test for ID_HC and ID_surtax consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
MattHJensen committed Nov 29, 2015
1 parent b3a6dcb commit 90a87ce
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions taxcalc/tests/test_calculate.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,37 @@ def test_calculate_mtr():
assert np.array_equal(mtr_FICA, mtr_IIT) == False


def test_ID_hc_vs_surtax():
policy1 = Policy()
puf1 = Records(TAX_DTA, weights=WEIGHTS, start_year=2009)
calc1 = Calculator(policy=policy1, records=puf1)

policy2 = Policy()
puf2 = Records(TAX_DTA, weights=WEIGHTS, start_year=2009)
calc2 = Calculator(policy=policy2, records=puf2)

reform1 = {2013: {'_ID_Medical_HC': [1],
'_ID_StateLocalTax_HC': [1],
'_ID_RealEstate_HC': [1],
'_ID_Casualty_HC': [1],
'_ID_Miscellaneous_HC': [1],
'_ID_InterestPaid_HC': [1],
'_ID_Charity_HC': [1]
}
}
reform2 = {2013: {'_ID_BenefitSurtax_crt': [0]
}
}

policy1.implement_reform(reform1)
policy2.implement_reform(reform2)

calc1.calc_all()
calc2.calc_all()

assert_array_equal(calc1.records._combined, calc2.records._combined)


def test_Calculator_create_difference_table():
# create current-law Policy object and use to create Calculator calc1
policy1 = Policy()
Expand Down

0 comments on commit 90a87ce

Please sign in to comment.