From 5d82c79c2fae756b2b0c637c403e5985489dd1d4 Mon Sep 17 00:00:00 2001 From: Kylian Ronfleux--Corail <35237015+Kyliroco@users.noreply.github.com> Date: Mon, 14 Apr 2025 08:06:33 +0000 Subject: [PATCH] add test to qtables to test all quantization tables for quality beetween 0 and 100 --- Tests/test_file_jpeg.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/Tests/test_file_jpeg.py b/Tests/test_file_jpeg.py index a13fe4edf..12e56d0b8 100644 --- a/Tests/test_file_jpeg.py +++ b/Tests/test_file_jpeg.py @@ -614,14 +614,18 @@ class TestFileJpeg: None ) ] + for quality in range(101): - qtable_from_qtable_quality = self.roundtrip( - im, - qtables={0: standard_l_qtable, 1: standard_chrominance_qtable}, - quality=75, - ).quantization - qtable_from_quality = self.roundtrip(im, quality=75).quantization - assert qtable_from_qtable_quality == qtable_from_quality + qtable_from_qtable_quality = self.roundtrip( + im, + qtables={0: standard_l_qtable, 1: standard_chrominance_qtable}, + quality=quality, + ).quantization + + qtable_from_quality = self.roundtrip(im, quality=quality).quantization + + assert qtable_from_qtable_quality == qtable_from_quality + # list of qtable lists assert_image_similar( im,