diff --git a/tests/python/bl_imbuf_load.py b/tests/python/bl_imbuf_load.py index 9ccc25168e4..8a2ffca0281 100644 --- a/tests/python/bl_imbuf_load.py +++ b/tests/python/bl_imbuf_load.py @@ -32,6 +32,7 @@ class ImBufTest(AbstractImBufTest): colorspace = img.colorspace_settings.name alpha_mode = img.alpha_mode actual_metadata = f"{channels=} {is_float=} {colorspace=} {alpha_mode=}" + expected_metadata = "" # Save actual metadata out_metadata_path.write_text(actual_metadata, encoding="utf-8") @@ -52,10 +53,14 @@ class ImBufTest(AbstractImBufTest): failed = True - if failed and self.update: - # Update reference if requested. - ref_metadata_path.write_text(actual_metadata, encoding="utf-8") - failed = False + if failed: + if self.update: + # Update reference if requested. + ref_metadata_path.write_text(actual_metadata, encoding="utf-8") + failed = False + else: + print_message( + "Expected [{}] but got [{}]".format(expected_metadata, actual_metadata)) return not failed diff --git a/tests/python/modules/imbuf_test.py b/tests/python/modules/imbuf_test.py index 55d59b5c302..f5dc7011d34 100644 --- a/tests/python/modules/imbuf_test.py +++ b/tests/python/modules/imbuf_test.py @@ -73,12 +73,14 @@ class AbstractImBufTest(unittest.TestCase): shutil.copy(out_filepath, ref_filepath) failed = False - # Generate diff image. + # Generate diff image (set fail thresholds high to reduce output spam). diff_img = str(self.diff_dir.joinpath(out_name + ".diff.png")) command = ( str(self.idiff), - "-o", diff_img, + "-fail", "1", + "-failpercent", "100", "-abs", "-scale", "16", + "-o", diff_img, ref_filepath, out_filepath )