diff --git a/Tests/images/imagedraw_wide_line_dot.png b/Tests/images/imagedraw_wide_line_dot.png new file mode 100644 index 000000000..d6f0e789c Binary files /dev/null and b/Tests/images/imagedraw_wide_line_dot.png differ diff --git a/Tests/test_imagedraw.py b/Tests/test_imagedraw.py index 8422675a8..757b3a217 100644 --- a/Tests/test_imagedraw.py +++ b/Tests/test_imagedraw.py @@ -503,6 +503,20 @@ class TestImageDraw(PillowTestCase): self.assert_image_equal(img, expected, 'line oblique 45 inverted 3px wide B failed') + def test_wide_line_dot(self): + # Test drawing a wide "line" from one point to another just draws + # a single point + # Arrange + im = Image.new("RGB", (W, H)) + draw = ImageDraw.Draw(im) + expected = "Tests/images/imagedraw_wide_line_dot.png" + + # Act + draw.line([(50, 50), (50, 50)], width=3) + del draw + + # Assert + self.assert_image_similar(im, Image.open(expected), 1) if __name__ == '__main__': unittest.main()