From 9a5249ca20f91b248ffd9fef76cf1bf555141a5d Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Sun, 12 Aug 2018 18:25:19 +0100 Subject: [PATCH] tag unicode strings as unicode seems to help with py2.7 anyway --- test/test-suite/test_foreign.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test-suite/test_foreign.py b/test/test-suite/test_foreign.py index 103ed639..e729c624 100644 --- a/test/test-suite/test_foreign.py +++ b/test/test-suite/test_foreign.py @@ -203,7 +203,7 @@ class TestForeign: x = pyvips.Image.new_from_file(JPEG_FILE) x = x.copy() - x.set_type(pyvips.GValue.gstr_type, "exif-ifd0-XPComment", "йцук") + x.set_type(pyvips.GValue.gstr_type, "exif-ifd0-XPComment", u"йцук") filename = temp_filename(self.tempdir, '.jpg') x.write_to_file(filename) @@ -212,7 +212,7 @@ class TestForeign: y = x.get("exif-ifd0-XPComment") # can't use == since the string will have an extra " (xx, yy, zz)" # format area at the end - assert y.startswith("йцук") + assert y.startswith(u"йцук") # can set/save/load UserComment, a tag which has the # encoding in the first 8 bytes ... though libexif only supports