mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-13 05:06:49 +03:00
Use more specific error
This commit is contained in:
parent
1661343bc0
commit
44b82e4513
|
@ -337,7 +337,7 @@ def test_issue_6194() -> None:
|
||||||
|
|
||||||
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(UnidentifiedImageError):
|
||||||
with Image.open("Tests/images/unbound_variable.jp2"):
|
with Image.open("Tests/images/unbound_variable.jp2"):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user