Updated match

This commit is contained in:
Andrew Murray 2025-08-02 11:19:06 +10:00
parent b0542eae12
commit ed22b7bc78

View File

@ -208,9 +208,10 @@ def test_exceptions() -> None:
ImageCms.getProfileName(None) # type: ignore[arg-type] ImageCms.getProfileName(None) # type: ignore[arg-type]
skip_missing() skip_missing()
# Python <= 3.9: "an integer is required (got type NoneType)" with pytest.raises(
# Python > 3.9: "'NoneType' object cannot be interpreted as an integer" ImageCms.PyCMSError,
with pytest.raises(ImageCms.PyCMSError, match="integer"): match="'NoneType' object cannot be interpreted as an integer",
):
ImageCms.isIntentSupported(SRGB, None, None) # type: ignore[arg-type] ImageCms.isIntentSupported(SRGB, None, None) # type: ignore[arg-type]