Apply suggestions from code review

Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
This commit is contained in:
Aarni Koskela 2023-03-03 16:00:56 +02:00 committed by GitHub
parent 32bfee030b
commit 912ab3e088
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -179,11 +179,11 @@ class TestEnvVars:
@pytest.mark.parametrize(
"var",
[
(
{"PILLOW_ALIGNMENT": "15"},
{"PILLOW_BLOCK_SIZE": "1024"},
{"PILLOW_BLOCKS_MAX": "wat"},
],
),
)
def test_warnings(self, var):
with pytest.warns(UserWarning):

View File

@ -31,7 +31,8 @@ class TestUnsupportedWebp:
file_path = "Tests/images/hopper.webp"
with pytest.warns(UserWarning):
with pytest.raises(OSError):
Image.open(file_path)
with Image.open(file_path):
pass
if HAVE_WEBP:
WebPImagePlugin.SUPPORTED = True