From 677a7db0dbcb656f1b080d74c159a838adadc9f6 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Fri, 17 Jul 2015 10:59:42 +0100 Subject: [PATCH] fix the exif mod test --- test/test_foreign.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/test/test_foreign.py b/test/test_foreign.py index 731de9d8..19b1de86 100755 --- a/test/test_foreign.py +++ b/test/test_foreign.py @@ -153,21 +153,17 @@ class TestForeign(unittest.TestCase): pass if have_exif: - print("have exif") + # we need a copy of the image to set the new metadata on + # otherwise we get caching problems + x = x.copy() x.set_value("exif-ifd0-Orientation", "2") - y = x.get_value("exif-ifd0-Orientation") - print("orientation is", y) x.write_to_file("test.jpg") - y = x.get_value("exif-ifd0-Orientation") - print("orientation is", y) x = Vips.Image.new_from_file("test.jpg") y = x.get_value("exif-ifd0-Orientation") - print("orientation is", y) self.assertEqual(y[0], "2") os.unlink("test.jpg") - def test_png(self): x = Vips.type_find("VipsForeign", "pngload") if not x.is_instantiatable():