Skip to content

Commit

Permalink
sort colors before comparing them
Browse files Browse the repository at this point in the history
  • Loading branch information
Yay295 committed Jan 6, 2023
1 parent 116e986 commit 2247c8d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Tests/test_image_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,13 @@ def _test_nearest(self, op, mode):

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):
Expand Down

0 comments on commit 2247c8d

Please sign in to comment.