[diffoscope] 02/02: Read ext4 reference diff using UTF-8

Jérémy Bobbio lunar at moszumanska.debian.org
Sun Dec 20 23:15:58 CET 2015


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

lunar pushed a commit to branch master
in repository diffoscope.

commit 4768c5612a4ca50b25dbb57f8b04aaa323af4a3d
Author: Jérémy Bobbio <lunar at debian.org>
Date:   Sun Dec 20 22:14:06 2015 +0000

    Read ext4 reference diff using UTF-8
    
    Otherwise we might fail to load it properly on system with a default encoding
    other than UTF-8.
---
 tests/comparators/test_fsimage.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/comparators/test_fsimage.py b/tests/comparators/test_fsimage.py
index 7cdc15c..d6acc65 100644
--- a/tests/comparators/test_fsimage.py
+++ b/tests/comparators/test_fsimage.py
@@ -80,7 +80,7 @@ def test_differences(differences):
     assert tardiff.source2 == './date.txt'
     assert encodingdiff.source1 == 'encoding'
     assert encodingdiff.source2 == 'encoding'
-    expected_diff = open(os.path.join(os.path.dirname(__file__), '../data/ext4_expected_diffs')).read()
+    expected_diff = open(os.path.join(os.path.dirname(__file__), '../data/ext4_expected_diffs'), encoding='utf-8').read()
     found_diff = tarinfo.unified_diff + tardiff.unified_diff + encodingdiff.unified_diff
     assert expected_diff == found_diff
 

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


More information about the diffoscope mailing list