Added test for a simple right triangle

The diagonals of the right angled edges must be perfect and the bottom
vertice should be drawn.
This commit is contained in:
Terseus 2014-04-04 11:46:58 +02:00
parent ec74779b19
commit e2cb2195eb
2 changed files with 7 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 B

View File

@ -63,3 +63,10 @@ def test_square():
draw.rectangle((7, 7, 2, 2), BLACK)
assert_image_equal(img, expected)
def test_triangle_right():
expected = Image.open(os.path.join(IMAGES_PATH, 'triangle_right.png'))
expected.load()
img, draw = create_base_image_draw((20, 20))
draw.polygon([(3, 5), (17, 5), (10, 12)], BLACK)
assert_image_equal(img, expected)