[Zope3-checkins] CVS: Zope3/src/zope/i18n/tests -
test_formats.py:1.10
Garrett Smith
garrett at mojave-corp.com
Tue Sep 23 22:57:42 EDT 2003
Update of /cvs-repository/Zope3/src/zope/i18n/tests
In directory cvs.zope.org:/tmp/cvs-serv27705/src/zope/i18n/tests
Modified Files:
test_formats.py
Log Message:
Fixed a bug that caused 12 hour time formatting to render '12:00' as '00:00'.
=== Zope3/src/zope/i18n/tests/test_formats.py 1.9 => 1.10 ===
--- Zope3/src/zope/i18n/tests/test_formats.py:1.9 Sat Jul 26 09:11:17 2003
+++ Zope3/src/zope/i18n/tests/test_formats.py Tue Sep 23 22:57:12 2003
@@ -263,6 +263,19 @@
self.format.format(datetime.datetime(2003, 01, 02, 02, 00),
'dd.MM.yy h:mm:ss a'),
'02.01.03 2:00:00 vorm.')
+ self.assertEqual(
+ self.format.format(datetime.time(0, 15), 'h:mm a'),
+ '12:15 vorm.')
+ self.assertEqual(
+ self.format.format(datetime.time(1, 15), 'h:mm a'),
+ '1:15 vorm.')
+ self.assertEqual(
+ self.format.format(datetime.time(12, 15), 'h:mm a'),
+ '12:15 nachm.')
+ self.assertEqual(
+ self.format.format(datetime.time(13, 15), 'h:mm a'),
+ '1:15 nachm.')
+
class TestNumberPatternParser(TestCase):
"""Extensive tests for the ICU-based-syntax number pattern parser."""
More information about the Zope3-Checkins
mailing list