mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-12 18:26:17 +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
|
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:
|
def test_unbound_local() -> None:
|
||||||
# prepatch, a malformed jp2 file could cause an UnboundLocalError exception.
|
# prepatch, a malformed jp2 file could cause an UnboundLocalError exception.
|
||||||
with pytest.raises(OSError):
|
with pytest.raises(OSError):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user