sort colors before comparing them

This commit is contained in:
Yay295 2022-10-09 02:58:14 -05:00 committed by Andrew Murray
parent 48b6d4fd60
commit 04199b6066

View File

@ -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):