From 5def9ffd094ac13f6cc2c557114e7f902f4fc0b1 Mon Sep 17 00:00:00 2001 From: Jacob Boerema Date: Sat, 27 Apr 2024 13:10:11 -0400 Subject: [PATCH] plug-ins: don't crash file export tests when sections is None --- .../python/tests/test-file-plug-ins/gimptestframework.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plug-ins/python/tests/test-file-plug-ins/gimptestframework.py b/plug-ins/python/tests/test-file-plug-ins/gimptestframework.py index 584c1d0301..ad6d215f3f 100755 --- a/plug-ins/python/tests/test-file-plug-ins/gimptestframework.py +++ b/plug-ins/python/tests/test-file-plug-ins/gimptestframework.py @@ -548,9 +548,10 @@ class GimpExportTestRunner(GimpTestRunner): def get_test_group_config(self, test_name): #FIXME maybe have this sorted and use a search... - for test in self.sections.test_groups: - if test.group_name == test_name: - return test + if self.sections is not None: + for test in self.sections.test_groups: + if test.group_name == test_name: + return test return None def add_test(self, test_class): @@ -563,7 +564,7 @@ class GimpExportTestRunner(GimpTestRunner): self.log.message(f"Running tests for {test.group_name}") test_config = self.get_test_group_config(test.group_name) if test_config is None: - self.log.error(f"Could not find configuration for {test.group_name}!") + self.log.error(f"Could not find configuration for {test.group_name} tests!") else: test.execute(test_config, self.test_cfg.data_folder) self.print_footer("Export tests finished")