diff --git a/test/test-suite/test_foreign.py b/test/test-suite/test_foreign.py index 729514df..851c8148 100644 --- a/test/test-suite/test_foreign.py +++ b/test/test-suite/test_foreign.py @@ -23,10 +23,10 @@ class TestForeign: cls.tempdir = tempfile.mkdtemp() cls.colour = pyvips.Image.jpegload(JPEG_FILE) - cls.mono = cls.colour.extract_band(1) + cls.mono = cls.colour.extract_band(1).copy() # we remove the ICC profile: the RGB one will no longer be appropriate cls.mono.remove("icc-profile-data") - cls.rad = cls.colour.float2rad() + cls.rad = cls.colour.float2rad().copy() cls.rad.remove("icc-profile-data") cls.cmyk = cls.colour.bandjoin(cls.mono) cls.cmyk = cls.cmyk.copy(interpretation=pyvips.Interpretation.CMYK) @@ -160,6 +160,7 @@ class TestForeign: # can remove orientation, save, load again, orientation # has reset + x = x.copy() x.remove("orientation") filename = temp_filename(self.tempdir, '.jpg') @@ -303,6 +304,7 @@ class TestForeign: x = pyvips.Image.new_from_file(filename) y = x.get("orientation") assert y == 2 + x = x.copy() x.remove("orientation") filename = temp_filename(self.tempdir, '.tif')