Skip to content

Commit e2a8e21

Browse files
committed
Removed _expand()
1 parent d42e537 commit e2a8e21

File tree

2 files changed

+0
-33
lines changed

2 files changed

+0
-33
lines changed

Tests/test_image.py

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -284,33 +284,6 @@ def test_comparison_with_other_type(self) -> None:
284284
assert item is not None
285285
assert item != num
286286

287-
def test_expand_x(self) -> None:
288-
# Arrange
289-
im = hopper()
290-
orig_size = im.size
291-
xmargin = 5
292-
293-
# Act
294-
im = im._expand(xmargin)
295-
296-
# Assert
297-
assert im.size[0] == orig_size[0] + 2 * xmargin
298-
assert im.size[1] == orig_size[1] + 2 * xmargin
299-
300-
def test_expand_xy(self) -> None:
301-
# Arrange
302-
im = hopper()
303-
orig_size = im.size
304-
xmargin = 5
305-
ymargin = 3
306-
307-
# Act
308-
im = im._expand(xmargin, ymargin)
309-
310-
# Assert
311-
assert im.size[0] == orig_size[0] + 2 * xmargin
312-
assert im.size[1] == orig_size[1] + 2 * ymargin
313-
314287
def test_getbands(self) -> None:
315288
# Assert
316289
assert hopper("RGB").getbands() == ("R", "G", "B")

src/PIL/Image.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1336,12 +1336,6 @@ def draft(
13361336
"""
13371337
pass
13381338

1339-
def _expand(self, xmargin: int, ymargin: int | None = None) -> Image:
1340-
if ymargin is None:
1341-
ymargin = xmargin
1342-
self.load()
1343-
return self._new(self.im.expand(xmargin, ymargin))
1344-
13451339
def filter(self, filter: ImageFilter.Filter | type[ImageFilter.Filter]) -> Image:
13461340
"""
13471341
Filters this image using the given filter. For a list of

0 commit comments

Comments
 (0)