plug-ins: don't crash file export tests when sections is None

This commit is contained in:
Jacob Boerema 2024-04-27 13:10:11 -04:00
parent 93722e81b5
commit 5def9ffd09
1 changed files with 5 additions and 4 deletions

View File

@ -548,6 +548,7 @@ class GimpExportTestRunner(GimpTestRunner):
def get_test_group_config(self, test_name):
#FIXME maybe have this sorted and use a search...
if self.sections is not None:
for test in self.sections.test_groups:
if test.group_name == test_name:
return test
@ -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")