diff --git a/Tests/test_image_array.py b/Tests/test_image_array.py index f5ca2b6b25f..d4fa9cea686 100644 --- a/Tests/test_image_array.py +++ b/Tests/test_image_array.py @@ -3,7 +3,6 @@ from typing import Any import pytest -from packaging.version import parse as parse_version from PIL import Image @@ -44,12 +43,8 @@ def test_with_dtype(dtype: npt.DTypeLike) -> None: test_with_dtype(numpy.uint8) with Image.open("Tests/images/truncated_jpeg.jpg") as im_truncated: - if parse_version(numpy.__version__) >= parse_version("1.23"): - with pytest.raises(OSError): - numpy.array(im_truncated) - else: - with pytest.warns(DeprecationWarning, match="__array_interface__"): - numpy.array(im_truncated) + with pytest.raises(OSError): + numpy.array(im_truncated) def test_fromarray() -> None: