diff options
| author | Christophe Simonis <chs@odoo.com> | 2019-08-21 16:58:16 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2019-08-21 16:58:16 +0200 |
| commit | 668c360e32b4130966eddc8ed28b6cb4e66055aa (patch) | |
| tree | 0e50e6458998b2e4ad029341600655586eb14929 /odoo/addons/base/tests/test_float.py | |
| parent | 121034f79a6a4e57ed936c8672fc5f8472ca2cfd (diff) | |
| parent | 1b234b1be75e32f741b3e236a89ea854f0c186a5 (diff) | |
[MERGE] forward port branch 11.0 up to 1b234b1be75
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 a5f91982303..641c9c2d9e7 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, |
