mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 01:04:29 +03:00
Test drawing a wide "line" from one point to another just draws a single point
This commit is contained in:
parent
2968313bb6
commit
5871b7a5ba
BIN
Tests/images/imagedraw_wide_line_dot.png
Normal file
BIN
Tests/images/imagedraw_wide_line_dot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 116 B |
|
@ -503,6 +503,20 @@ class TestImageDraw(PillowTestCase):
|
||||||
self.assert_image_equal(img, expected,
|
self.assert_image_equal(img, expected,
|
||||||
'line oblique 45 inverted 3px wide B failed')
|
'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__':
|
if __name__ == '__main__':
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user