mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-10 16:22:22 +03:00
Updated type hints
This commit is contained in:
parent
3abce858c3
commit
7e6a2f68b5
|
@ -1171,6 +1171,7 @@ def test_append_images(tmp_path: Path) -> None:
|
|||
im.copy().save(out, append_images=ims)
|
||||
|
||||
with Image.open(out) as reread:
|
||||
assert isinstance(reread, GifImagePlugin.GifImageFile)
|
||||
assert reread.n_frames == 3
|
||||
|
||||
# Tests appending using a generator
|
||||
|
|
|
@ -1062,8 +1062,8 @@ class TestFileLibTiff(LibTiffTestCase):
|
|||
# Set EXIF Orientation to 2
|
||||
data = data[:102] + b"\x02" + data[103:]
|
||||
|
||||
with Image.open(io.BytesIO(data)) as im:
|
||||
im = im.transpose(Image.Transpose.FLIP_LEFT_RIGHT)
|
||||
with Image.open(io.BytesIO(data)) as img:
|
||||
im = img.transpose(Image.Transpose.FLIP_LEFT_RIGHT)
|
||||
assert_image_equal_tofile(im, "Tests/images/old-style-jpeg-compression.png")
|
||||
|
||||
def test_open_missing_samplesperpixel(self) -> None:
|
||||
|
|
|
@ -103,10 +103,12 @@ def test_load_set_dpi() -> None:
|
|||
|
||||
if not hasattr(Image.core, "drawwmf"):
|
||||
return
|
||||
assert isinstance(im, WmfImagePlugin.WmfStubImageFile)
|
||||
im.load(im.info["dpi"])
|
||||
assert im.size == (1625, 1625)
|
||||
|
||||
with Image.open("Tests/images/drawing.emf") as im:
|
||||
assert isinstance(im, WmfImagePlugin.WmfStubImageFile)
|
||||
im.load((72, 144))
|
||||
assert im.size == (82, 164)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user