mirror of
https://github.com/python-pillow/Pillow.git
synced 2026-01-12 11:41:14 +03:00
Fix unclosed file warning (#9371)
This commit is contained in:
commit
00ec73dfd1
|
|
@ -231,15 +231,15 @@ def test_negate() -> None:
|
|||
|
||||
|
||||
def test_incorrect_mode() -> None:
|
||||
im = hopper()
|
||||
mop = ImageMorph.MorphOp(op_name="erosion8")
|
||||
|
||||
with pytest.raises(ValueError, match="Image mode must be 1 or L"):
|
||||
mop.apply(im)
|
||||
with pytest.raises(ValueError, match="Image mode must be 1 or L"):
|
||||
mop.match(im)
|
||||
with pytest.raises(ValueError, match="Image mode must be 1 or L"):
|
||||
mop.get_on_pixels(im)
|
||||
with hopper() as im:
|
||||
with pytest.raises(ValueError, match="Image mode must be 1 or L"):
|
||||
mop.apply(im)
|
||||
with pytest.raises(ValueError, match="Image mode must be 1 or L"):
|
||||
mop.match(im)
|
||||
with pytest.raises(ValueError, match="Image mode must be 1 or L"):
|
||||
mop.get_on_pixels(im)
|
||||
|
||||
|
||||
def test_add_patterns() -> None:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user