[diffoscope] 02/02: Factor out the unicode decoding of the identify -version output.
Chris Lamb
chris at chris-lamb.co.uk
Thu Mar 16 17:00:31 CET 2017
This is an automated email from the git hooks/post-receive script.
lamby pushed a commit to branch experimental
in repository diffoscope.
commit 8b4ad1de8c0e273190d2d615686aec9a9db1a3ce
Author: Chris Lamb <lamby at debian.org>
Date: Thu Mar 16 17:00:16 2017 +0100
Factor out the unicode decoding of the identify -version output.
Gbp-Dch: ignore.
---
tests/comparators/test_jpeg_image.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/comparators/test_jpeg_image.py b/tests/comparators/test_jpeg_image.py
index 6ad3418..af405e4 100644
--- a/tests/comparators/test_jpeg_image.py
+++ b/tests/comparators/test_jpeg_image.py
@@ -34,12 +34,12 @@ image1_meta = load_fixture('test1_meta.jpg')
image2_meta = load_fixture('test2_meta.jpg')
def identify_version():
- out = subprocess.check_output(['identify', '-version'])
+ out = subprocess.check_output(['identify', '-version']).decode('utf-8')
# First line is expected to look like
# "Version: ImageMagick 6.9.6-6 Q16 x86_64 20161125 ..."
- if not out.startswith(b"Version: ImageMagick "):
+ if not out.startswith("Version: ImageMagick "):
return '0.0.0'
- return out.decode('utf-8').splitlines()[0].split()[2].strip()
+ return out.splitlines()[0].split()[2].strip()
def test_identification(image1):
assert isinstance(image1, JPEGImageFile)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git
More information about the diffoscope
mailing list