Ticket #83 (closed defect: fixed)
unittest failing on time
| Reported by: | jruigrok | Owned by: | cmlenz |
|---|---|---|---|
| Priority: | critical | Milestone: | 0.9.3 |
| Component: | Date Formatting | Version: | 0.9.2 |
| Keywords: | Cc: |
Description
The following two might most likely fail due to summer/winter time differences.
FAIL: format_time (babel.dates)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python2.5/doctest.py", line 2112, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for babel.dates.format_time
File "/usr/home/asmodai/projects/babel/babel/dates.py", line 504, in format_time
----------------------------------------------------------------------
File "/usr/home/asmodai/projects/babel/babel/dates.py", line 524, in babel.dates.format_time
Failed example:
format_time(t, format='full', tzinfo=timezone('Europe/Paris'),
locale='fr_FR')
Expected:
u'17:30:00 HEC'
Got:
u'16:30:00 HEC'
----------------------------------------------------------------------
File "/usr/home/asmodai/projects/babel/babel/dates.py", line 527, in babel.dates.format_time
Failed example:
format_time(t, "hh 'o''clock' a, zzzz", tzinfo=timezone('US/Eastern'),
locale='en')
Expected:
u"11 o'clock AM, Eastern Daylight Time"
Got:
u"10 o'clock AM, Eastern Standard Time"
FAIL: time (babel.support.Format)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python2.5/doctest.py", line 2112, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for babel.support.Format.time
File "/usr/home/asmodai/projects/babel/babel/support.py", line 77, in time
----------------------------------------------------------------------
File "/usr/home/asmodai/projects/babel/babel/support.py", line 82, in babel.support.Format.time
Failed example:
fmt.time(time(15, 30))
Expected:
u'11:30:00 AM'
Got:
u'10:30:00 AM'
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
