add failing test
This commit is contained in:
parent
31e73d8179
commit
d8996eae82
1 changed files with 13 additions and 0 deletions
13
test.py
13
test.py
|
|
@ -17,3 +17,16 @@ def test_bug1():
|
|||
balances = {'0': -39, '1': 139, '2': -54, '3': 99, '4': 13, '5': 175, '6': -173, '7': -160}
|
||||
transactions = solve(balances, tolerance=tolerance)
|
||||
assert abs(sum(perform_transfers(balances, transactions).values())) <= tolerance
|
||||
|
||||
def test_2_subgroups():
|
||||
balances = {
|
||||
"A": 50,
|
||||
"B": -20,
|
||||
"C": -30,
|
||||
"D": 70,
|
||||
"E": -35,
|
||||
"F": -35,
|
||||
}
|
||||
transactions = solve(balances)
|
||||
assert abs(sum(perform_transfers(balances, transactions).values())) == 0
|
||||
assert len(transactions) == 4
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue