diff --git a/scripts/generate_test_result.py b/scripts/generate_test_result.py index f2cc2054..92cffc1b 100755 --- a/scripts/generate_test_result.py +++ b/scripts/generate_test_result.py @@ -171,13 +171,21 @@ def sort_key(key, value): return 0 if isinstance(value, str) and "\n" in value: return 7000 - if isinstance(value, list) and len(value) > 1: + if isinstance(value, list) and not small(value): return 8000 - if isinstance(value, dict): + if isinstance(value, dict) and not small(value): return 9000 return 0 +def small(obj): + if isinstance(obj, list): + return False if len(obj) > 1 else small(obj[0]) + if isinstance(obj, dict): + return False if len(obj) > 1 else small(next(iter(obj.values()))) + return True + + def insert_test_result(args, result, lines): idx_block = None flag = False