mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
restore the use of python rather than pypy in the batfiles (windows)
This commit is contained in:
parent
7a7fc781a0
commit
02b9b964b8
1 changed files with 4 additions and 6 deletions
|
|
@ -1,3 +1,4 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import with_statement
|
from __future__ import with_statement
|
||||||
try:
|
try:
|
||||||
from unittest2 import TestCase
|
from unittest2 import TestCase
|
||||||
|
|
@ -83,18 +84,15 @@ class TestPage(TestCase):
|
||||||
|
|
||||||
self.assertEqual(page.locale_date, dt.strftime(_DEFAULT_CONFIG['DEFAULT_DATE_FORMAT']))
|
self.assertEqual(page.locale_date, dt.strftime(_DEFAULT_CONFIG['DEFAULT_DATE_FORMAT']))
|
||||||
|
|
||||||
|
|
||||||
page_kwargs['settings'] = {x:_DEFAULT_CONFIG[x] for x in _DEFAULT_CONFIG}
|
page_kwargs['settings'] = {x:_DEFAULT_CONFIG[x] for x in _DEFAULT_CONFIG}
|
||||||
# I doubt this can work on all platforms ...
|
# I doubt this can work on all platforms ...
|
||||||
if platform == "win32":
|
if platform == "win32":
|
||||||
locale = 'jpn'
|
locale = 'jpn'
|
||||||
else:
|
else:
|
||||||
locale = 'ja_JP'
|
locale = 'ja_JP.utf8'
|
||||||
page_kwargs['settings']['DATE_FORMATS'] = {'jp':(locale,'%Y-%m-%d(%a)')}
|
page_kwargs['settings']['DATE_FORMATS'] = {'jp':(locale,'%Y-%m-%d(%a)')}
|
||||||
page_kwargs['metadata']['lang'] = 'jp'
|
page_kwargs['metadata']['lang'] = 'jp'
|
||||||
page = Page( **page_kwargs)
|
page = Page( **page_kwargs)
|
||||||
self.assertEqual(page.locale_date, u'2015-09-13(\u65e5)')
|
self.assertEqual(page.locale_date, u'2015-09-13(\u65e5)')
|
||||||
# above is unicode in Japanese: 2015-09-13(“ú)
|
# above is unicode in Japanese: 2015-09-13(“ú)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue