[Zope3-checkins] CVS: Zope3/src/zope/i18n/tests - test_formats.py:1.8
Stephan Richter
srichter@cbu.edu
Sat, 12 Apr 2003 20:21:43 -0400
Update of /cvs-repository/Zope3/src/zope/i18n/tests
In directory cvs.zope.org:/tmp/cvs-serv23465/src/zope/i18n/tests
Modified Files:
test_formats.py
Log Message:
Found a little bug that caused a failure in formatting dates that are a
Saturday. Fixed it and added a test.
=== Zope3/src/zope/i18n/tests/test_formats.py 1.7 => 1.8 ===
--- Zope3/src/zope/i18n/tests/test_formats.py:1.7 Tue Mar 25 09:48:02 2003
+++ Zope3/src/zope/i18n/tests/test_formats.py Sat Apr 12 20:21:42 2003
@@ -241,6 +241,15 @@
'dd.MM.yy hh:mm a'),
'02.01.03 09:48 nachm.')
+ def test_formatAllWeekdays(self):
+ for day in range(1, 8):
+ self.assertEqual(self.format.format(
+ datetime.datetime(2003, 01, day+4, 21, 48),
+ "EEEE, d. MMMM yyyy H:mm' Uhr 'z"),
+ '%s, %i. Januar 2003 21:48 Uhr +000' %(
+ self.format.calendar.weekdays[day][0], day+4))
+
+
class TestNumberPatternParser(TestCase):
"""Extensive tests for the ICU-based-syntax number pattern parser."""