diff options
Diffstat (limited to 'odoo/addons/base/tests/test_float.py')
| -rw-r--r-- | odoo/addons/base/tests/test_float.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/odoo/addons/base/tests/test_float.py b/odoo/addons/base/tests/test_float.py index 4dbf1f5f139..5bfdbea0a92 100644 --- a/odoo/addons/base/tests/test_float.py +++ b/odoo/addons/base/tests/test_float.py @@ -27,6 +27,8 @@ class TestFloatPrecision(TransactionCase): try_round(0.0049,'0.00') # 0.0049 is closer to 0 than to 0.01, so should round down try_round(0.005,'0.01') # the rule is to round half away from zero try_round(-0.005,'-0.01') # the rule is to round half away from zero + try_round(6.6 * 0.175, '1.16') # 6.6 * 0.175 is rounded to 1.15 with epsilon = 53 + try_round(-6.6 * 0.175, '-1.16') def try_zero(amount, expected): self.assertEqual(currency.is_zero(amount), expected, |
