Skip to content

Commit f881126

Browse files
committed
Load test files as Unicode
Signed-off-by: Philippe Ombredanne <[email protected]>
1 parent e386049 commit f881126

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/test_attrib.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
from __future__ import print_function
1919
from __future__ import unicode_literals
2020

21+
import io
2122
import os
2223
import unittest
2324

@@ -63,7 +64,7 @@ def test_check_template_all_builtin_templates_are_valid(self):
6364
builtin_templates_dir = os.path.dirname(attrib.DEFAULT_TEMPLATE_FILE)
6465
for template in os.listdir(builtin_templates_dir):
6566
template_loc = os.path.join(builtin_templates_dir, template)
66-
with open(template_loc, 'rb') as tmpl:
67+
with io.open(template_loc, 'r', encoding='utf-8') as tmpl:
6768
template = tmpl.read()
6869
try:
6970
assert None == attrib.check_template(template)

0 commit comments

Comments
 (0)