Skip to content

Commit b16e93b

Browse files
committed
Fix tests for python 2.7.
1 parent d3de6d8 commit b16e93b

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
language: python
22
python:
3+
- "2.7"
34
- "3.2"
45
- "3.3"
56
# command to install dependencies
67
install: "pip install -r requirements.txt --use-mirrors"
78
# command to run tests
8-
script:
9+
script:
910
- python setup.py test
1011
- coverage run --source=i18n setup.py test
1112
after_success:

i18n/tests/loader_tests.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#-*- encoding: utf-8 -*-
2+
13
import unittest
24
import os
35
import os.path
@@ -72,8 +74,8 @@ def test_load_file_with_strange_encoding(self):
7274
resource_loader.init_json_loader()
7375
config.set("encoding", "euc-jp")
7476
data = resource_loader.load_resource(os.path.join(RESOURCE_FOLDER, "settings", "eucjp_config.json"), "settings")
75-
self.assertIn("ほげ", data)
76-
self.assertEqual("ホゲ", data['ほげ'])
77+
self.assertIn(u"ほげ", data)
78+
self.assertEqual(u"ホゲ", data[u'ほげ'])
7779

7880
def test_get_namespace_from_filepath_with_filename(self):
7981
tests = {

0 commit comments

Comments
 (0)