From f6e024212cbe7187622d37a0ce92d5e7c32a9e8a Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sat, 19 Feb 2022 10:49:23 +1100 Subject: [PATCH] Use enums for quantize instead of raw values --- Tests/test_image_quantize.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Tests/test_image_quantize.py b/Tests/test_image_quantize.py index d48ee6c86..e9afd9118 100644 --- a/Tests/test_image_quantize.py +++ b/Tests/test_image_quantize.py @@ -60,7 +60,7 @@ def test_quantize_no_dither(): with Image.open("Tests/images/caption_6_33_22.png") as palette: palette = palette.convert("P") - converted = image.quantize(dither=0, palette=palette) + converted = image.quantize(dither=Image.Dither.NONE, palette=palette) assert converted.mode == "P" assert converted.palette.palette == palette.palette.palette @@ -70,8 +70,8 @@ def test_quantize_dither_diff(): with Image.open("Tests/images/caption_6_33_22.png") as palette: palette = palette.convert("P") - dither = image.quantize(dither=1, palette=palette) - nodither = image.quantize(dither=0, palette=palette) + dither = image.quantize(dither=Image.Dither.FLOYDSTEINBERG, palette=palette) + nodither = image.quantize(dither=Image.Dither.NONE, palette=palette) assert dither.tobytes() != nodither.tobytes()