Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 357886 Details for
Bug 482034
www-apps/trac-1.0.1 - migrate to distutils-r1.eclass
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
files/trac-1.0.1-changeset_11892.diff
trac-1.0.1-changeset_11892.diff (text/plain), 7.52 KB, created by
Bertrand Jacquin
on 2013-09-04 22:22:53 UTC
(
hide
)
Description:
files/trac-1.0.1-changeset_11892.diff
Filename:
MIME Type:
Creator:
Bertrand Jacquin
Created:
2013-09-04 22:22:53 UTC
Size:
7.52 KB
patch
obsolete
>------------------------------------------------------------------------ >r11892 | jomae | 2013-07-29 15:46:16 +0200 (Mon, 29 Jul 2013) | 2 lines > >1.0.2dev: follow-ups to r11876, fixed test failures due to other differences between CLDR 1.6.x and 23 (a part of #11258) > > >Index: trac/util/tests/datefmt.py >=================================================================== >--- trac/util/tests/datefmt.py (revision 11891) >+++ trac/util/tests/datefmt.py (revision 11892) >@@ -730,13 +730,20 @@ > I18nDateFormatTestCase = None > else: > class I18nDateFormatTestCase(unittest.TestCase): >+ >+ if not hasattr(unittest.TestCase, 'assertIn'): >+ def assertIn(self, member, container, msg=None): >+ if member not in container: >+ raise self.failureException(msg or '%r not in %r' % >+ (member, container)) >+ > def test_i18n_format_datetime(self): > tz = datefmt.timezone('GMT +2:00') > t = datetime.datetime(2010, 8, 28, 11, 45, 56, 123456, datefmt.utc) > en_US = Locale.parse('en_US') >- self.assert_(datefmt.format_datetime(t, tzinfo=tz, locale=en_US) >- in ('Aug 28, 2010 1:45:56 PM', >- 'Aug 28, 2010, 1:45:56 PM')) # CLDR 23 >+ self.assertIn(datefmt.format_datetime(t, tzinfo=tz, locale=en_US), >+ ('Aug 28, 2010 1:45:56 PM', >+ 'Aug 28, 2010, 1:45:56 PM')) # CLDR 23 > en_GB = Locale.parse('en_GB') > self.assertEqual('28 Aug 2010 13:45:56', > datefmt.format_datetime(t, tzinfo=tz, >@@ -751,9 +758,9 @@ > self.assertEqual(u'13:45:56 28-08-2010', > datefmt.format_datetime(t, tzinfo=tz, locale=vi)) > zh_CN = Locale.parse('zh_CN') >- self.assertEqual(u'2010-8-28 ä¸å01:45:56', >- datefmt.format_datetime(t, tzinfo=tz, >- locale=zh_CN)) >+ self.assertIn(datefmt.format_datetime(t, tzinfo=tz, locale=zh_CN), >+ (u'2010-8-28 ä¸å01:45:56', >+ u'2010å¹´8æ28æ¥ ä¸å1:45:56')) > > def test_i18n_format_date(self): > tz = datefmt.timezone('GMT +2:00') >@@ -774,8 +781,8 @@ > self.assertEqual(u'07-08-2010', > datefmt.format_date(t, tzinfo=tz, locale=vi)) > zh_CN = Locale.parse('zh_CN') >- self.assertEqual(u'2010-8-7', >- datefmt.format_date(t, tzinfo=tz, locale=zh_CN)) >+ self.assertIn(datefmt.format_date(t, tzinfo=tz, locale=zh_CN), >+ (u'2010-8-7', u'2010å¹´8æ7æ¥')) > > def test_i18n_format_time(self): > tz = datefmt.timezone('GMT +2:00') >@@ -797,8 +804,8 @@ > datefmt.format_time(t, tzinfo=tz, locale=ja)) > self.assertEqual('13:45:56', > datefmt.format_time(t, tzinfo=tz, locale=vi)) >- self.assertEqual(u'ä¸å01:45:56', >- datefmt.format_time(t, tzinfo=tz, locale=zh_CN)) >+ self.assertIn(datefmt.format_time(t, tzinfo=tz, locale=zh_CN), >+ (u'ä¸å01:45:56', u'ä¸å1:45:56')) > > def test_i18n_datetime_hint(self): > en_US = Locale.parse('en_US') >@@ -808,18 +815,19 @@ > vi = Locale.parse('vi') > zh_CN = Locale.parse('zh_CN') > >- self.assert_(datefmt.get_datetime_format_hint(en_US) >- in ('MMM d, yyyy h:mm:ss a', 'MMM d, y h:mm:ss a')) >- self.assert_(datefmt.get_datetime_format_hint(en_GB) >- in ('d MMM yyyy HH:mm:ss', 'd MMM y HH:mm:ss')) >- self.assert_(datefmt.get_datetime_format_hint(fr) >- in ('d MMM yyyy HH:mm:ss', 'd MMM y HH:mm:ss')) >- self.assertEqual('yyyy/MM/dd H:mm:ss', >- datefmt.get_datetime_format_hint(ja)) >- self.assertEqual('HH:mm:ss dd-MM-yyyy', >- datefmt.get_datetime_format_hint(vi)) >- self.assertEqual('yyyy-M-d ahh:mm:ss', >- datefmt.get_datetime_format_hint(zh_CN)) >+ self.assertIn(datefmt.get_datetime_format_hint(en_US), >+ ('MMM d, yyyy h:mm:ss a', 'MMM d, y h:mm:ss a', >+ 'MMM d, y, h:mm:ss a')) >+ self.assertIn(datefmt.get_datetime_format_hint(en_GB), >+ ('d MMM yyyy HH:mm:ss', 'd MMM y HH:mm:ss')) >+ self.assertIn(datefmt.get_datetime_format_hint(fr), >+ ('d MMM yyyy HH:mm:ss', 'd MMM y HH:mm:ss')) >+ self.assertIn(datefmt.get_datetime_format_hint(ja), >+ ('yyyy/MM/dd H:mm:ss', 'y/MM/dd H:mm:ss')) >+ self.assertIn(datefmt.get_datetime_format_hint(vi), >+ ('HH:mm:ss dd-MM-yyyy', 'HH:mm:ss dd-MM-y')) >+ self.assertIn(datefmt.get_datetime_format_hint(zh_CN), >+ ('yyyy-M-d ahh:mm:ss', u'yå¹´Mædæ¥ ah:mm:ss')) > > def test_i18n_date_hint(self): > en_US = Locale.parse('en_US') >@@ -829,18 +837,18 @@ > vi = Locale.parse('vi') > zh_CN = Locale.parse('zh_CN') > >- self.assert_(datefmt.get_date_format_hint(en_US) >- in ('MMM d, yyyy', 'MMM d, y')) >- self.assert_(datefmt.get_date_format_hint(en_GB) >- in ('d MMM yyyy', 'd MMM y')) >- self.assert_(datefmt.get_date_format_hint(fr) >- in ('d MMM yyyy', 'd MMM y')) >- self.assertEqual('yyyy/MM/dd', >- datefmt.get_date_format_hint(ja)) >- self.assertEqual('dd-MM-yyyy', >- datefmt.get_date_format_hint(vi)) >- self.assertEqual('yyyy-M-d', >- datefmt.get_date_format_hint(zh_CN)) >+ self.assertIn(datefmt.get_date_format_hint(en_US), >+ ('MMM d, yyyy', 'MMM d, y')) >+ self.assertIn(datefmt.get_date_format_hint(en_GB), >+ ('d MMM yyyy', 'd MMM y')) >+ self.assertIn(datefmt.get_date_format_hint(fr), >+ ('d MMM yyyy', 'd MMM y')) >+ self.assertIn(datefmt.get_date_format_hint(ja), >+ ('yyyy/MM/dd', 'y/MM/dd')) >+ self.assertIn(datefmt.get_date_format_hint(vi), >+ ('dd-MM-yyyy', 'dd-MM-y')) >+ self.assertIn(datefmt.get_date_format_hint(zh_CN), >+ ('yyyy-M-d', u'yå¹´Mædæ¥')) > > def test_i18n_parse_date_iso8609(self): > tz = datefmt.timezone('GMT +2:00') >@@ -1022,9 +1030,9 @@ > en_US = Locale.parse('en_US') > > # Converting default format to babel's format >- self.assert_(datefmt.format_datetime(t, '%x %X', tz, en_US) >- in ('Aug 28, 2010 1:45:56 PM', >- 'Aug 28, 2010, 1:45:56 PM')) # CLDR 23 >+ self.assertIn(datefmt.format_datetime(t, '%x %X', tz, en_US), >+ ('Aug 28, 2010 1:45:56 PM', >+ 'Aug 28, 2010, 1:45:56 PM')) # CLDR 23 > self.assertEqual('Aug 28, 2010', > datefmt.format_datetime(t, '%x', tz, en_US)) > self.assertEqual('1:45:56 PM', > >------------------------------------------------------------------------
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 482034
:
356648
|
356650
|
356652
|
357850
|
357858
|
357860
|
357862
|
357864
|
357866
|
357868
|
357870
|
357872
|
357874
|
357876
|
357878
|
357880
|
357882
|
357884
| 357886 |
357888
|
376934
|
377034
|
377036
|
377038