diff --git a/Tests/test_imagecms.py b/Tests/test_imagecms.py index 8b5d88ac8..1953458bc 100644 --- a/Tests/test_imagecms.py +++ b/Tests/test_imagecms.py @@ -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]