Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why are there failures in the test_compatible_data tests? #1823

Closed
martinholmer opened this issue Jan 14, 2018 · 3 comments
Closed

Why are there failures in the test_compatible_data tests? #1823

martinholmer opened this issue Jan 14, 2018 · 3 comments
Labels

Comments

@martinholmer
Copy link
Collaborator

Pull request #1614 was recently merged into the master branch and its test_compatible_data.py code has been revised in pull request #1822 to be more consistent with the new policy regime that has been in the current_law_policy.py file since the merge of pull request #1803.

Because of the complexity of test_compatible_data and the scale of changes in what is now current-law policy, there are 7 (out of 45 pre_release tests) failures after #1822. The 11 parameters that failed test_compatible_data are as follows:

taxcalc$ py.test -n4 -m compatible_data 2>&1 | grep ERROR: | grep -v errmsg | sort
ERROR: _ID_BenefitSurtax_Switch not False for cps
ERROR: _ID_Casualty_c not False for puf
ERROR: _ID_Casualty_frt not False for puf
ERROR: _ID_Miscellaneous_c not False for cps
ERROR: _ID_Miscellaneous_c not False for puf
ERROR: _ID_Miscellaneous_frt not False for cps
ERROR: _ID_Miscellaneous_frt not False for puf
ERROR: _ID_crt not False for cps
ERROR: _ID_crt not False for puf
ERROR: _ID_ps not False for cps
ERROR: _ID_ps not False for puf

As you can see, all eleven failing policy parameters have to do with itemized deductions, the rules for which have changed substantially with the passage of TCJA.

I'm not sure how to make these test failures go away. I don't know if the compatible_data field values in the current_law_policy.json file need to be changed or if the code in the test_compatible_data.py file needs to be changed or if there are other problems. Any help would be appreciated.

@MattHJensen
Copy link
Contributor

MattHJensen commented Jan 17, 2018

It looks like these parameters are no longer "active" under the new current law. In order for the tests to pass, baseline changes have to be made here in order to activate these parameters.

For example, ID_Casualty_c isn't active anymore because ID_Casualty_hc is 1 in the new current law. ID_Casualty_hc needs to be below 1 for ID_Casualty_c influence the results, which is what the tests are checking for.

@martinholmer
Copy link
Collaborator Author

@MattHJensen said:

It looks like these parameters are no longer "active" under the new current law. In order for the tests to pass, baseline changes have to be made here in order to activate these parameters.

For example, ID_Casualty_c isn't active anymore because ID_Casualty_hc is 1 in the new current law. ID_Casualty_hc needs to be below 1 for ID_Casualty_c influence the results, which is what the tests are checking for.

Thanks for the explanation. Do you want to make those changes in a new pull request?

@MattHJensen
Copy link
Contributor

MattHJensen commented Jan 21, 2018

Do you want to make those changes in a new pull request?

Coming soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants