mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-25 08:10:33 +03:00
Added additional test
This commit is contained in:
parent
24e9961c4f
commit
7cf351cfc5
|
@ -728,6 +728,20 @@ class TestFileTiff:
|
||||||
with Image.open(mp) as reread:
|
with Image.open(mp) as reread:
|
||||||
assert reread.n_frames == 3
|
assert reread.n_frames == 3
|
||||||
|
|
||||||
|
def test_fixoffsets(self) -> None:
|
||||||
|
b = BytesIO(b"II\x2a\x00\x00\x00\x00\x00")
|
||||||
|
with TiffImagePlugin.AppendingTiffWriter(b) as a:
|
||||||
|
b.seek(0)
|
||||||
|
a.fixOffsets(1, isShort=True)
|
||||||
|
|
||||||
|
b.seek(0)
|
||||||
|
a.fixOffsets(1, isLong=True)
|
||||||
|
|
||||||
|
# Neither short nor long
|
||||||
|
b.seek(0)
|
||||||
|
with pytest.raises(RuntimeError):
|
||||||
|
a.fixOffsets(1)
|
||||||
|
|
||||||
def test_saving_icc_profile(self, tmp_path: Path) -> None:
|
def test_saving_icc_profile(self, tmp_path: Path) -> None:
|
||||||
# Tests saving TIFF with icc_profile set.
|
# Tests saving TIFF with icc_profile set.
|
||||||
# At the time of writing this will only work for non-compressed tiffs
|
# At the time of writing this will only work for non-compressed tiffs
|
||||||
|
|
Loading…
Reference in New Issue
Block a user