Skip to content

Commit 1006791

Browse files
committed
Money constructor likes strings better than floats
1 parent 3f98899 commit 1006791

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

test/testSplit.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
class APIInterfaceTests(unittest.TestCase):
88
def test_splits(self):
99
cases = [
10-
{"amount": 1.00, "ppl": 2, "expect": (0.50, 0)},
11-
{"amount": 1.00, "ppl": 3, "expect": (0.33, 0.01)},
12-
{"amount": 12.97, "ppl": 5, "expect": (2.59, 0.02)},
13-
{"amount": 52000, "ppl": 3, "expect": (1733.33, 0.01)},
10+
{"amount": "1.00", "ppl": 2, "expect": ("0.50","0.00")},
11+
{"amount": "1.00", "ppl": 3, "expect": ("0.33", "0.01")},
12+
{"amount": "12.97", "ppl": 5, "expect": ("2.59", "0.02")},
13+
{"amount": "52000", "ppl": 3, "expect": ("1733.33", "0.01")},
1414
]
1515
for case in cases:
1616
expect = (Money(case['expect'][0], "CAD"), Money(case['expect'][1], "CAD"))

0 commit comments

Comments
 (0)