Skip to content

Commit 61ce550

Browse files
committed
Simplify test to use Image.new instead of opening file
1 parent 41c73d1 commit 61ce550

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Tests/test_imageops.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,9 +258,9 @@ def test_expand_palette(border: int | tuple[int, int, int, int]) -> None:
258258

259259
@pytest.mark.parametrize("border", ((1,), (1, 2, 3), (1, 2, 3, 4, 5)))
260260
def test_expand_invalid_border(border: tuple[int, ...]) -> None:
261-
with Image.open("Tests/images/hopper.ppm") as im:
262-
with pytest.raises(ValueError):
263-
ImageOps.expand(im, border)
261+
im = Image.new("1", (1, 1))
262+
with pytest.raises(ValueError):
263+
ImageOps.expand(im, border)
264264

265265

266266
def test_colorize_2color() -> None:

0 commit comments

Comments
 (0)