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]
skip_missing()
# Python <= 3.9: "an integer is required (got type NoneType)"
# Python > 3.9: "'NoneType' object cannot be interpreted as an integer"
with pytest.raises(ImageCms.PyCMSError, match="integer"):
with pytest.raises(
ImageCms.PyCMSError,
match="'NoneType' object cannot be interpreted as an integer",
):
ImageCms.isIntentSupported(SRGB, None, None) # type: ignore[arg-type]