fix test suite for metadata changes
added a few more .copy() calls
This commit is contained in:
parent
acd9101037
commit
5c7a649001
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user