mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-27 17:54:32 +03:00
Failing test for #2783
This commit is contained in:
parent
0454cb8eb9
commit
5524d806b4
|
@ -380,7 +380,6 @@ class TestImageDraw(PillowTestCase):
|
||||||
self.assert_image_equal(
|
self.assert_image_equal(
|
||||||
im, Image.open("Tests/images/imagedraw_floodfill2.png"))
|
im, Image.open("Tests/images/imagedraw_floodfill2.png"))
|
||||||
|
|
||||||
|
|
||||||
def test_floodfill_thresh(self):
|
def test_floodfill_thresh(self):
|
||||||
# floodfill() is experimental
|
# floodfill() is experimental
|
||||||
|
|
||||||
|
@ -560,6 +559,19 @@ class TestImageDraw(PillowTestCase):
|
||||||
# Assert
|
# Assert
|
||||||
self.assert_image_similar(im, Image.open(expected), 1)
|
self.assert_image_similar(im, Image.open(expected), 1)
|
||||||
|
|
||||||
|
def test_textsize_empty_string(self):
|
||||||
|
# https://github.com/python-pillow/Pillow/issues/2783
|
||||||
|
# Arrange
|
||||||
|
im = Image.new("RGB", (W, H))
|
||||||
|
draw = ImageDraw.Draw(im)
|
||||||
|
|
||||||
|
# Act
|
||||||
|
# Should not cause 'SystemError: <built-in method getsize of
|
||||||
|
# ImagingFont object at 0x...> returned NULL without setting an error'
|
||||||
|
draw.textsize("")
|
||||||
|
draw.textsize("\n")
|
||||||
|
draw.textsize("test\n")
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user