[diffoscope] 01/01: tests.presenters: Prevent FTBFS by loading fixtures as UTF-8 in case surrounding terminal is not Unicode-aware. (Closes: #852926)

Chris Lamb chris at chris-lamb.co.uk
Sat Jan 28 09:55:56 CET 2017


This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository diffoscope.

commit ad367a01f64bcb874643a03fd88b42f330a38ac6
Author: Chris Lamb <lamby at debian.org>
Date:   Sat Jan 28 21:54:57 2017 +1300

    tests.presenters: Prevent FTBFS by loading fixtures as UTF-8 in case surrounding terminal is not Unicode-aware. (Closes: #852926)
---
 tests/test_presenters.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/test_presenters.py b/tests/test_presenters.py
index 6e075a8..0e5167f 100644
--- a/tests/test_presenters.py
+++ b/tests/test_presenters.py
@@ -45,7 +45,7 @@ def run(capsys, *args):
     return out
 
 def data(filename):
-    with open(os.path.join(DATA_DIR, filename)) as f:
+    with open(os.path.join(DATA_DIR, filename), encoding='utf-8') as f:
         return f.read()
 
 def extract_body(val):

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git


More information about the diffoscope mailing list