Commit ba81cd7f authored by Jérome Perrin's avatar Jérome Perrin

add test


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38871 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent df1a4635
...@@ -127,6 +127,11 @@ class TestFloatField(ERP5TypeTestCase): ...@@ -127,6 +127,11 @@ class TestFloatField(ERP5TypeTestCase):
self.assertEquals('566.30', self.assertEquals('566.30',
self.widget.format_value(self.field, 281.80 + 54.50 + 230.00)) self.widget.format_value(self.field, 281.80 + 54.50 + 230.00))
def test_format_no_precision(self):
self.assertEquals('7.2', self.widget.format_value(self.field, 7.2))
self.assertEquals('0.009999', self.widget.format_value(self.field, 0.009999))
self.assertEquals('1000.0', self.widget.format_value(self.field, 1000))
def test_render_view(self): def test_render_view(self):
self.field.values['input_style'] = '-1 234.5' self.field.values['input_style'] = '-1 234.5'
self.field.values['precision'] = 2 self.field.values['precision'] = 2
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment