mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-13 05:06:49 +03:00
Apply suggestions from code review
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
This commit is contained in:
parent
32bfee030b
commit
912ab3e088
|
@ -179,11 +179,11 @@ class TestEnvVars:
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
"var",
|
"var",
|
||||||
[
|
(
|
||||||
{"PILLOW_ALIGNMENT": "15"},
|
{"PILLOW_ALIGNMENT": "15"},
|
||||||
{"PILLOW_BLOCK_SIZE": "1024"},
|
{"PILLOW_BLOCK_SIZE": "1024"},
|
||||||
{"PILLOW_BLOCKS_MAX": "wat"},
|
{"PILLOW_BLOCKS_MAX": "wat"},
|
||||||
],
|
),
|
||||||
)
|
)
|
||||||
def test_warnings(self, var):
|
def test_warnings(self, var):
|
||||||
with pytest.warns(UserWarning):
|
with pytest.warns(UserWarning):
|
||||||
|
|
|
@ -31,7 +31,8 @@ class TestUnsupportedWebp:
|
||||||
file_path = "Tests/images/hopper.webp"
|
file_path = "Tests/images/hopper.webp"
|
||||||
with pytest.warns(UserWarning):
|
with pytest.warns(UserWarning):
|
||||||
with pytest.raises(OSError):
|
with pytest.raises(OSError):
|
||||||
Image.open(file_path)
|
with Image.open(file_path):
|
||||||
|
pass
|
||||||
|
|
||||||
if HAVE_WEBP:
|
if HAVE_WEBP:
|
||||||
WebPImagePlugin.SUPPORTED = True
|
WebPImagePlugin.SUPPORTED = True
|
||||||
|
|
Loading…
Reference in New Issue
Block a user