Skip to content

Commit

Permalink
Failing test for python-pillow#2783
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk authored and wiredfool committed Oct 4, 2017
1 parent 0454cb8 commit 5524d80
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion Tests/test_imagedraw.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,6 @@ def test_floodfill_border(self):
self.assert_image_equal(
im, Image.open("Tests/images/imagedraw_floodfill2.png"))


def test_floodfill_thresh(self):
# floodfill() is experimental

Expand Down Expand Up @@ -560,6 +559,19 @@ def test_wide_line_dot(self):
# Assert
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__':
unittest.main()

0 comments on commit 5524d80

Please sign in to comment.