From eb5387c37434a53a119e7fcbdb8e8d6796c9c51d Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Wed, 16 Apr 2025 13:04:38 +0200 Subject: [PATCH] fix ltv usage for renderer tests --- tests/renderer/utils.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/tests/renderer/utils.py b/tests/renderer/utils.py index aac6a3d7c8..13b03edc0b 100644 --- a/tests/renderer/utils.py +++ b/tests/renderer/utils.py @@ -230,28 +230,29 @@ def run_renderer( # if in REF or CUT creation mode use the comparetestv if test_info.config.option.create_ref or test_info.config.option.create_cut: - FORMAT_TO_FILE = FORMAT_TO_FILE_COMPARETEST - elif test_info.config.option.use_ltv: + format_to_file = FORMAT_TO_FILE_COMPARETEST + else: + format_to_file = FORMAT_TO_FILE_SMOKETEST + + if test_info.config.option.use_ltv: if test_info.config.option.ltv_dir: - FORMAT_TO_FILE = dict() + format_to_file = dict() for k, v in FORMAT_TO_FILE_LTV.items(): - FORMAT_TO_FILE[k] = str(v).replace( + format_to_file[k] = str(v).replace( str(LTV_DIR), str(test_info.config.option.ltv_dir) ) else: - FORMAT_TO_FILE = FORMAT_TO_FILE_LTV - else: - FORMAT_TO_FILE = FORMAT_TO_FILE_SMOKETEST + format_to_file = FORMAT_TO_FILE_LTV if in_file is None: if metadata_input is not None: in_file = metadata_input in_name = metadata_input.stem elif not isinstance(in_fmt, str): - in_file = FORMAT_TO_FILE[in_fmt.stem] + in_file = format_to_file[in_fmt.stem] in_name = in_fmt.stem else: - in_file = FORMAT_TO_FILE[in_fmt] + in_file = format_to_file[in_fmt] in_name = in_fmt if out_file is None: -- GitLab