mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 09:26:16 +03:00
Added test
This commit is contained in:
parent
58d5a73fac
commit
88b21e7254
BIN
Tests/images/unknown_mode.j2k
Normal file
BIN
Tests/images/unknown_mode.j2k
Normal file
Binary file not shown.
|
@ -335,6 +335,12 @@ def test_issue_6194() -> None:
|
|||
assert im.getpixel((5, 5)) == 31
|
||||
|
||||
|
||||
def test_unknown_j2k_mode() -> None:
|
||||
with pytest.raises(UnidentifiedImageError):
|
||||
with Image.open("Tests/images/unknown_mode.j2k"):
|
||||
pass
|
||||
|
||||
|
||||
def test_unbound_local() -> None:
|
||||
# prepatch, a malformed jp2 file could cause an UnboundLocalError exception.
|
||||
with pytest.raises(OSError):
|
||||
|
|
Loading…
Reference in New Issue
Block a user