Mercurial > babel > old > mirror
comparison 0.9.x/babel/tests/dates.py @ 351:f7a5e6025fa1 stable
Ported [385] to 0.9.x branch.
author | cmlenz |
---|---|
date | Mon, 16 Jun 2008 16:07:52 +0000 |
parents | 05975a0e7021 |
children | 6a0e7205790f |
comparison
equal
deleted
inserted
replaced
349:5c606de6497e | 351:f7a5e6025fa1 |
---|---|
215 "yyyy-MM-dd HH:mm", locale='en_US') | 215 "yyyy-MM-dd HH:mm", locale='en_US') |
216 | 216 |
217 | 217 |
218 class FormatTimeTestCase(unittest.TestCase): | 218 class FormatTimeTestCase(unittest.TestCase): |
219 | 219 |
220 def test_with_naive_datetime_and_tzinfo(self): | |
221 string = dates.format_time(datetime(2007, 4, 1, 15, 30), | |
222 'long', tzinfo=timezone('US/Eastern'), | |
223 locale='en') | |
224 self.assertEqual('11:30:00 AM EDT', string) | |
225 | |
220 def test_with_date_fields_in_pattern(self): | 226 def test_with_date_fields_in_pattern(self): |
221 self.assertRaises(AttributeError, dates.format_time, date(2007, 04, 01), | 227 self.assertRaises(AttributeError, dates.format_time, date(2007, 04, 01), |
222 "yyyy-MM-dd HH:mm", locale='en_US') | 228 "yyyy-MM-dd HH:mm", locale='en_US') |
223 | 229 |
224 def test_with_date_fields_in_pattern_and_datetime_param(self): | 230 def test_with_date_fields_in_pattern_and_datetime_param(self): |