projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0e42163
)
[FIX] base: typo during forward port 0e4216361bf13cc0feb6f8d8200af80f343d066d
author
Denis Ledoux
<dle@odoo.com>
Wed, 22 Oct 2014 17:27:00 +0000
(19:27 +0200)
committer
Denis Ledoux
<dle@odoo.com>
Wed, 22 Oct 2014 17:27:00 +0000
(19:27 +0200)
openerp/addons/base/test/base_test.yml
patch
|
blob
|
history
diff --git
a/openerp/addons/base/test/base_test.yml
b/openerp/addons/base/test/base_test.yml
index
3a4ccf1
..
b801792
100644
(file)
--- a/
openerp/addons/base/test/base_test.yml
+++ b/
openerp/addons/base/test/base_test.yml
@@
-198,8
+198,9
@@
-
!python {model: res.currency}: |
from openerp.tools import float_compare, float_is_zero, float_round, float_repr
-
!python {model: res.currency}: |
from openerp.tools import float_compare, float_is_zero, float_round, float_repr
- def try_round(amount, expected, precision_digits=3, float_round=float_round, float_repr=float_repr):
+ def try_round(amount, expected, precision_digits=3, float_round=float_round, float_repr=float_repr, rounding_method='HALF-UP'):
result = float_repr(float_round(amount, precision_digits=precision_digits, rounding_method=rounding_method),
result = float_repr(float_round(amount, precision_digits=precision_digits, rounding_method=rounding_method),
+ precision_digits=precision_digits)
assert result == expected, 'Rounding error: got %s, expected %s' % (result, expected)
try_round(2.6745, '2.675')
try_round(-2.6745, '-2.675')
assert result == expected, 'Rounding error: got %s, expected %s' % (result, expected)
try_round(2.6745, '2.675')
try_round(-2.6745, '-2.675')