From 1e3803f43c37fd78c6dff84525ad925212d06a51 Mon Sep 17 00:00:00 2001 From: Sean Sullivan Date: Fri, 10 Nov 2023 11:44:51 -0500 Subject: [PATCH] More text that is slightly different between pillow versions --- tests/test_drawing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_drawing.py b/tests/test_drawing.py index 09faf58..bb85ffc 100644 --- a/tests/test_drawing.py +++ b/tests/test_drawing.py @@ -43,7 +43,7 @@ def test_gen_debug_img(): expected = Image.open("./tests/dat/gen_debug_img.png") img = drawing.gen_debug_img(width, height, text, thickness) - np.testing.assert_equal(np.array(expected), np.array(img)) + np.testing.assert_array_almost_equal(np.array(expected), np.array(img)) def test_gen_overlay(): img = drawing.gen_empty(256, 256) @@ -55,7 +55,7 @@ def test_gen_debug_overlay(): img = drawing.gen_empty(256, 256) expected = Path("./tests/dat/gen_debug_overlay.txt").read_bytes() actual = drawing.gen_debug_overlay(img, "hello, world!") - np.testing.assert_array_almost_equal(np.array(expected), np.array(img)) + np.testing.assert_array_almost_equal(np.array(expected), np.array(actual)) def test_generate_x_tile(): expected = Path("./tests/dat/gen_error.txt").read_bytes()