Use assert_image_equal_tofile

This commit is contained in:
Andrew Murray 2021-03-20 22:42:10 +11:00
parent 9a4b1301de
commit 006de79d60

View File

@ -1352,10 +1352,6 @@ def test_compute_regular_polygon_vertices_input_error_handling(
def test_continuous_horizontal_edges_polygon():
with Image.open(
os.path.join(IMAGES_PATH, "continuous_horizontal_edges_polygon.png")
) as expected:
expected.load()
xy = [
(2, 6),
(12, 6),
@ -1367,4 +1363,7 @@ def test_continuous_horizontal_edges_polygon():
]
img, draw = create_base_image_draw((16, 16))
draw.polygon(xy, BLACK)
assert_image_equal(img, expected, "continuous horizontal edges polygon failed")
expected = os.path.join(IMAGES_PATH, "continuous_horizontal_edges_polygon.png")
assert_image_equal_tofile(
img, expected, "continuous horizontal edges polygon failed"
)