MCPcopy Index your code
hub / github.com/python-pillow/Pillow / test_fill

Method test_fill

Tests/test_image_transform.py:100–110  ·  view source on GitHub ↗
(self, mode: str, expected_pixel: tuple[int, ...])

Source from the content-addressed store, hash-verified

98 ),
99 )
100 def test_fill(self, mode: str, expected_pixel: tuple[int, ...]) -> None:
101 im = hopper(mode)
102 w, h = im.size
103 transformed = im.transform(
104 im.size,
105 Image.Transform.EXTENT,
106 (0, 0, w * 2, h * 2),
107 Image.Resampling.BILINEAR,
108 fillcolor="red",
109 )
110 assert transformed.getpixel((w - 1, h - 1)) == expected_pixel
111
112 def test_mesh(self) -> None:
113 # this should be a checkerboard of halfsized hoppers in ul, lr

Callers

nothing calls this directly

Calls 3

hopperFunction · 0.85
getpixelMethod · 0.80
transformMethod · 0.45

Tested by

no test coverage detected