From 04199b6066aedbdef961008fadcc726d0546a0e1 Mon Sep 17 00:00:00 2001 From: Yay295 Date: Sun, 9 Oct 2022 02:58:14 -0500 Subject: [PATCH] sort colors before comparing them --- Tests/test_image_transform.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Tests/test_image_transform.py b/Tests/test_image_transform.py index 7411f0b78..64a5c9459 100644 --- a/Tests/test_image_transform.py +++ b/Tests/test_image_transform.py @@ -178,11 +178,13 @@ class TestImageTransform: im = op(im, (40, 10)) - colors = im.getcolors() - assert colors == [ - (20 * 10, opaque), - (20 * 10, transparent), - ] + colors = sorted(im.getcolors()) + assert colors == sorted( + ( + (20 * 10, opaque), + (20 * 10, transparent), + ) + ) @pytest.mark.parametrize("mode", ("RGBA", "LA")) def test_nearest_resize(self, mode):