Skip to content

Commit 210ea46

Browse files
author
Sean Sullivan
committed
Pillow draws text differently between version 10.0.1 and 10.1.0 causing the image to be 0.139% different
1 parent b6800e0 commit 210ea46

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test_drawing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def test_gen_overlay_img():
3333
expected = Image.open("./tests/dat/gen_overlay_img.png")
3434
img = drawing.gen_overlay_img(width, height, thickness)
3535

36-
np.testing.assert_equal(np.array(expected), np.array(img))
36+
np.testing.assert_array_almost_equal(np.array(expected), np.array(img))
3737

3838
def test_gen_debug_img():
3939
width = 256
@@ -55,7 +55,7 @@ def test_gen_debug_overlay():
5555
img = drawing.gen_empty(256, 256)
5656
expected = Path("./tests/dat/gen_debug_overlay.txt").read_bytes()
5757
actual = drawing.gen_debug_overlay(img, "hello, world!")
58-
assert expected == actual
58+
np.testing.assert_array_almost_equal(np.array(expected), np.array(img))
5959

6060
def test_generate_x_tile():
6161
expected = Path("./tests/dat/gen_error.txt").read_bytes()

0 commit comments

Comments
 (0)