mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-16 11:12:29 +03:00
Improve WmfImagePlugin test coverage (#9090)
This commit is contained in:
commit
5e26d2fa2c
|
@ -44,6 +44,18 @@ def test_load_zero_inch() -> None:
|
|||
pass
|
||||
|
||||
|
||||
def test_load_unsupported_wmf() -> None:
|
||||
b = BytesIO(b"\xd7\xcd\xc6\x9a\x00\x00" + b"\x01" * 10)
|
||||
with pytest.raises(SyntaxError, match="Unsupported WMF file format"):
|
||||
WmfImagePlugin.WmfStubImageFile(b)
|
||||
|
||||
|
||||
def test_load_unsupported() -> None:
|
||||
b = BytesIO(b"\x01\x00\x00\x00")
|
||||
with pytest.raises(SyntaxError, match="Unsupported file format"):
|
||||
WmfImagePlugin.WmfStubImageFile(b)
|
||||
|
||||
|
||||
def test_render() -> None:
|
||||
with open("Tests/images/drawing.emf", "rb") as fp:
|
||||
data = fp.read()
|
||||
|
|
Loading…
Reference in New Issue
Block a user