Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 357870 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_11712.diff
trac-1.0.1-changeset_11712.diff (text/plain), 2.23 KB, created by
Bertrand Jacquin
on 2013-09-04 22:21:08 UTC
(
hide
)
Description:
files/trac-1.0.1-changeset_11712.diff
Filename:
MIME Type:
Creator:
Bertrand Jacquin
Created:
2013-09-04 22:21:08 UTC
Size:
2.23 KB
patch
obsolete
>------------------------------------------------------------------------ >r11712 | jomae | 2013-03-10 17:07:36 +0100 (Sun, 10 Mar 2013) | 2 lines > >1.0.2dev: follow-up to r11684, `test_i18n_parse_date_roundtrip` needs the full list of locales in Trac if no `*.mo` files. > > >Index: trac/util/tests/datefmt.py >=================================================================== >--- trac/util/tests/datefmt.py (revision 11711) >+++ trac/util/tests/datefmt.py (revision 11712) >@@ -945,20 +945,27 @@ > datefmt.parse_date(u'2010-8-28', tz, zh_CN)) > > def test_i18n_parse_date_roundtrip(self): >+ from pkg_resources import resource_listdir >+ locales = sorted(dirname >+ for dirname in resource_listdir('trac', 'locale') >+ if '.' not in dirname) >+ > tz = datefmt.timezone('GMT +2:00') > t = datetime.datetime(2010, 8, 28, 11, 45, 56, 123456, datefmt.utc) >- expected = datetime.datetime(2010, 8, 28, 13, 45, 56, 0, tz) >+ tz_t = datetime.datetime(2010, 8, 28, 13, 45, 56, 0, tz) > >- for locale in translation.get_available_locales(): >+ for locale in locales: > locale = Locale.parse(locale) > formatted = datefmt.format_datetime(t, tzinfo=tz, > locale=locale) > > actual = datefmt.parse_date(formatted, tz, locale) >- self.assertEqual(expected, actual, >- '%r != %r (%r)' % (expected, actual, locale)) >+ self.assertEqual(tz_t, actual, >+ '%r != %r (%r %r)' % (tz_t, actual, formatted, >+ locale)) >+ self.assertEqual(tz_t.isoformat(), actual.isoformat()) > >- actual = datefmt.format_datetime(expected, tzinfo=tz, >+ actual = datefmt.format_datetime(tz_t, tzinfo=tz, > locale=locale) > self.assertEqual(formatted, actual, > '%r != %r (%r)' % (formatted, actual, locale)) > >------------------------------------------------------------------------
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