mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 17:24:31 +03:00
Added tests of hor/ver lines 101px wide
These tests should guarantee that the proportion of the width is maintained with a margin of error < 1%.
This commit is contained in:
parent
8228caf14d
commit
4b7236f460
BIN
Tests/images/imagedraw/line_horizontal_w101px.png
Normal file
BIN
Tests/images/imagedraw/line_horizontal_w101px.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 368 B |
BIN
Tests/images/imagedraw/line_vertical_w101px.png
Normal file
BIN
Tests/images/imagedraw/line_vertical_w101px.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 438 B |
|
@ -87,6 +87,11 @@ def test_line_horizontal():
|
|||
img, draw = create_base_image_draw((20, 20))
|
||||
draw.line((14, 5, 5, 5), BLACK, 3)
|
||||
assert_image_equal(img, expected, 'line straigth horizontal inverted 3px wide failed')
|
||||
expected = Image.open(os.path.join(IMAGES_PATH, 'line_horizontal_w101px.png'))
|
||||
expected.load()
|
||||
img, draw = create_base_image_draw((200, 110))
|
||||
draw.line((5, 55, 195, 55), BLACK, 101)
|
||||
assert_image_equal(img, expected, 'line straigth horizontal 101px wide failed')
|
||||
|
||||
|
||||
def test_line_vertical():
|
||||
|
@ -108,6 +113,11 @@ def test_line_vertical():
|
|||
img, draw = create_base_image_draw((20, 20))
|
||||
draw.line((5, 14, 5, 5), BLACK, 3)
|
||||
assert_image_equal(img, expected, 'line straigth vertical inverted 3px wide failed')
|
||||
expected = Image.open(os.path.join(IMAGES_PATH, 'line_vertical_w101px.png'))
|
||||
expected.load()
|
||||
img, draw = create_base_image_draw((110, 200))
|
||||
draw.line((55, 5, 55, 195), BLACK, 101)
|
||||
assert_image_equal(img, expected, 'line straigth vertical 101px wide failed')
|
||||
|
||||
|
||||
def test_line_oblique_45():
|
||||
|
|
Loading…
Reference in New Issue
Block a user