[Zope3-checkins] CVS: Zope3/src/zope/i18n/locales/tests - test_locales.py:1.3

Garrett Smith garrett at mojave-corp.com
Fri Mar 26 21:32:20 EST 2004


Update of /cvs-repository/Zope3/src/zope/i18n/locales/tests
In directory cvs.zope.org:/tmp/cvs-serv12605/src/zope/i18n/locales/tests

Modified Files:
	test_locales.py 
Log Message:
Added support for rounding formatted numbers. E.g. 1.49 formatted with
the pattern "0.0" should be "1.5" -- not "1.4". 


=== Zope3/src/zope/i18n/locales/tests/test_locales.py 1.2 => 1.3 ===
--- Zope3/src/zope/i18n/locales/tests/test_locales.py:1.2	Fri Mar  5 17:09:27 2004
+++ Zope3/src/zope/i18n/locales/tests/test_locales.py	Fri Mar 26 21:31:49 2004
@@ -116,8 +116,8 @@
     def test_getNumberFormatter(self):
         formatter = self.locale.numbers.getFormatter('decimal')
         self.assertEqual(formatter.getPattern(), '###0.###;-###0.###')
-        self.assertEqual(formatter.format(1234.5678), '1234.567')
-        self.assertEqual(formatter.format(-1234.5678), '-1234.567')
+        self.assertEqual(formatter.format(1234.5678), '1234.568')
+        self.assertEqual(formatter.format(-1234.5678), '-1234.568')
         self.assertEqual(formatter.parse('1234.567'), 1234.567)
         self.assertEqual(formatter.parse('-1234.567'), -1234.567)
 




More information about the Zope3-Checkins mailing list