-
-
Notifications
You must be signed in to change notification settings - Fork 159
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
Add test that shows bug in GainsTax function and fix bug #981
Conversation
Current coverage is 98.27% (diff: 100%)@@ master #981 diff @@
==========================================
Files 35 35
Lines 2085 2085
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
Hits 2049 2049
Misses 36 36
Partials 0 0
|
Before the #981 bug-fix code change in the
So, before the bug fix, the marginal tax rate on LTCG ( After the bug fix in #981, the mtr on LTCG is 0.188 both before and after the reform that makes II and PT rates different. @MattHJensen @feenberg @Amy-Xu @GoFroggyRun @andersonfrailey @zrisher |
@martinholmer, this looks good to me. @codykallen, thanks a lot for the bug report and suggested fix! @martinholmer, do you think it is ok to merge this now? I think it deserves a TC version bump and redeploy to TaxBrain asap given that I know there are currently users on TB who would be affected. cc @talumbau |
@MattHJensen said:
Yes, I'm comfortable with the changes in pull request #981, but was hoping to get a thumbs up from @codykallen before doing the merge. But I haven't heard anything from his this morning. |
This pull request adds a test to illustrate a bug in the GainsTax function and then fixes that bug. This bug was reported by @codykallen in issue #977. The fix for this bug in this pull request is logically equivalent to the code revision suggested by @codykallen in pull request #979, but eliminates the duplication of code inherent in #979. Thank you, @codykallen, for your helpful bug report in #977 and your correct diagnosis of the bug's cause in #979.
As an aside for other Tax-Calculator contributors, the bug report in #977 is an example to be emulated: it describes the problem and provides a simple test to demonstrate the problem. #979 goes the extra mile by actually suggesting how to fix the bug reported in #977.
What I have done in this pull request is two things:
(1) created a new unit test based on the bug report in #977, and
(2) fixed the bug (that is, revised the code so that the new test does not fail).
@MattHJensen @feenberg @Amy-Xu @GoFroggyRun @andersonfrailey @zrisher