File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -780,15 +780,17 @@ def test_appending_tiff_writer_writelong(self) -> None:
780
780
data = b"II\x2A \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 "
781
781
b = BytesIO (data )
782
782
with TiffImagePlugin .AppendingTiffWriter (b ) as a :
783
+ a .seek (- 4 , os .SEEK_CUR )
783
784
a .writeLong (2 ** 32 - 1 )
784
- assert b .getvalue () == data + b"\xff \xff \xff \xff "
785
+ assert b .getvalue () == data [: - 4 ] + b"\xff \xff \xff \xff "
785
786
786
787
def test_appending_tiff_writer_rewritelastshorttolong (self ) -> None :
787
788
data = b"II\x2A \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 "
788
789
b = BytesIO (data )
789
790
with TiffImagePlugin .AppendingTiffWriter (b ) as a :
791
+ a .seek (- 2 , os .SEEK_CUR )
790
792
a .rewriteLastShortToLong (2 ** 32 - 1 )
791
- assert b .getvalue () == data [:- 2 ] + b"\xff \xff \xff \xff "
793
+ assert b .getvalue () == data [:- 4 ] + b"\xff \xff \xff \xff "
792
794
793
795
def test_saving_icc_profile (self , tmp_path : Path ) -> None :
794
796
# Tests saving TIFF with icc_profile set.
You can’t perform that action at this time.
0 commit comments