mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Port pelican to python 3.
Stays compatible with 2.x series, thanks to an unified codebase.
This commit is contained in:
parent
9847394e12
commit
71995d5e1b
43 changed files with 495 additions and 287 deletions
|
|
@ -113,8 +113,8 @@ class TestPage(unittest.TestCase):
|
|||
page = Page(**page_kwargs)
|
||||
|
||||
self.assertEqual(page.locale_date,
|
||||
unicode(dt.strftime(_DEFAULT_CONFIG['DEFAULT_DATE_FORMAT']),
|
||||
'utf-8'))
|
||||
dt.strftime(_DEFAULT_CONFIG['DEFAULT_DATE_FORMAT']))
|
||||
|
||||
|
||||
page_kwargs['settings'] = dict([(x, _DEFAULT_CONFIG[x]) for x in
|
||||
_DEFAULT_CONFIG])
|
||||
|
|
@ -131,7 +131,7 @@ class TestPage(unittest.TestCase):
|
|||
import locale as locale_module
|
||||
try:
|
||||
page = Page(**page_kwargs)
|
||||
self.assertEqual(page.locale_date, u'2015-09-13(\u65e5)')
|
||||
self.assertEqual(page.locale_date, '2015-09-13(\u65e5)')
|
||||
except locale_module.Error:
|
||||
# The constructor of ``Page`` will try to set the locale to
|
||||
# ``ja_JP.utf8``. But this attempt will failed when there is no
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue