From df2f9bfea927d84ca3cfa98a1139c9010e6a08c4 Mon Sep 17 00:00:00 2001 From: Louis Date: Sat, 7 Nov 2015 05:32:30 +0100 Subject: [PATCH] [test] Ensure tex and control files are read as UTF8 References #155 --- test/test_compilation/test_compilation.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/test_compilation/test_compilation.py b/test/test_compilation/test_compilation.py index 3af70d19..0444efa2 100644 --- a/test/test_compilation/test_compilation.py +++ b/test/test_compilation/test_compilation.py @@ -9,7 +9,6 @@ import sys import subprocess import unittest -from patacrep.encoding import open_read from patacrep.files import path2posix from .. import dynamic # pylint: disable=unused-import @@ -64,8 +63,8 @@ class FileTest(unittest.TestCase, metaclass=dynamic.DynamicTest): raise unittest.SkipTest('No control file for {}'.format(songbook)) tex = "{}.tex".format(base) - with open_read(control) as expectfile: - with open_read(tex) as latexfile: + with open(control, mode="r", encoding="utf8") as expectfile: + with open(tex, mode="r", encoding="utf8") as latexfile: expected = expectfile.read().strip() expected = expected.replace( "@TEST_FOLDER@",