Tax-Calculator
Tax-Calculator copied to clipboard
Unit testing of calcfunctions.py
While is full code coverage for tests of calcfunctions.py, the unit tests essentially only confirm that all function arguments are passed properly and that those passed are used. There ought to be tests that validate the logic of each function (i.e., that given certain values for inputs, the expected output values are produced).
cc @MattHJensen This might be a good beginner issue to work on (at least for most of the functions in calcfunctions.py).
Evidence in favor: https://github.com/PSLmodels/Tax-Calculator/issues/2551
Checklist of functions in calcfunctions.py module that have unit tests written specifically for them (or in progress through open PRs) in test_calcfunctions.py:
- [ ]
BenefitPrograms - [ ]
EI_PayrollTax - [x]
DependentCare - [ ]
Adj - [ ]
ALD_InvInc_ec_base - [ ]
CapGains - [ ]
SSBenefits - [ ]
UBI - [ ]
AGI - [ ]
ItemDedCap - [ ]
ItemDed - [ ]
AdditionalMedicareTax - [x]
StdDed - [x]
TaxInc - [ ]
SchXYZ - [ ]
SchXYZTax - [ ]
GainsTax - [ ]
AGIsurtax - [ ]
AMT - [ ]
NetInvIncTax - [ ]
F2441 - [ ]
EITCamount - [ ]
EITC - [ ]
RefundablePayrollTaxCredit - [ ]
ChildDepTaxCredit - [x]
PersonalTaxCredit - [ ]
AmOppCreditParts - [ ]
SchR - [ ]
EducationTaxCredit - [ ]
CharityCredit - [ ]
NonrefundableCredits - [ ]
AdditionalCTC - [ ]
C1040 - [ ]
CTC_new - [ ]
IITAX - [ ]
Taxes - [ ]
ComputeBenefit - [ ]
BenefitSurtax - [ ]
BenefitLimitation - [x]
FairShareTax - [x]
LumpSumTax - [x]
ExpandIncome - [x]
AfterTaxIncome
Writing unit test for a single one of these functions is a good place to start to learn more about Tax-Calculator. You can deal with the a single function without having to know the full model.
These are ideal issues for someone with good knowledge of the tax code (or an interest in learning more about it) and moderate experience with Python (and a willingness to learn more).