-
Notifications
You must be signed in to change notification settings - Fork 308
Conversation
Is there a human friendly description of the problem that this PR is aimed to solve? |
hey @techtonik - Sorry about that. This is just something that we forgot to implement in #2914. The problem we're trying to solve is #2664. |
funded_tips = self.db.all("SELECT amount FROM tips WHERE is_funded ORDER BY id") | ||
assert funded_tips == [3, 6, 1, 4, 10, 5] | ||
assert funded_tips == [50, 10, 30, 70, 51, 5] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you change so many things in this test ? From reading the diff I can't tell what you're trying to do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test was kinda messy because we had added stuff over time to check for various situations. I didn't want to add one more participant into the equation, so I spent some time on restructuring to make sure that we check for all the following cases:
- tips from previously failing CCs are not funded
- payday goes beyond 2 steps
- team takes are included in the calculations
- make sure funds are not transferred to closed accounts
This reverts commit a4ff0b3.
@rohitpaulk I've reverted your changes to the test and then fixed it again but this time without changing all the tip amounts, the diff is a lot smaller. Does it look okay to you ? |
@Changaco - This doesn't check whether the depth is > 2. Replace the first tip loop with the old statement
and the test will pass, but it shouldn't. |
@rohitpaulk Your version had the same problem. I've added a separate test for depth. |
Cool, going to merge this in :) |
No description provided.