From 658096f3c43ac5c43cbf3598f239ee63fd8813d0 Mon Sep 17 00:00:00 2001 From: Roberto Navarro Date: Wed, 22 Jan 2025 12:10:23 +0100 Subject: [PATCH] allow to save a jpg diff file in gui step (#410) --- CHANGELOG.rst | 2 ++ toolium/visual_test.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index a6d81f14..2a10ecc0 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,6 +6,8 @@ v3.3.1 *Release date: In development* + - Allow to save the diff image in jpg format for visual tests working with jpg + v3.3.0 ------ diff --git a/toolium/visual_test.py b/toolium/visual_test.py index a4f6a59f..0fc10331 100644 --- a/toolium/visual_test.py +++ b/toolium/visual_test.py @@ -305,7 +305,7 @@ def compare_files(self, report_name, image_path, baseline_path, threshold): baseline_max.paste(baseline.convert('RGB')) # Generate and save diff image - diff_path = image_path.replace('.png', '.diff.png') + diff_path = image_path.replace('.png', '.diff.png').replace('.jpg', '.diff.jpg') diff_pixels_percentage = self.save_differences_image(image_max, baseline_max, diff_path) # Check differences and add to report