Skip to content

Commit

Permalink
Clean up test report characterization code (unicode-org#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
sven-oly authored Nov 29, 2023
1 parent 2a9f9bf commit 4fc33ea
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions verifier/testreport.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ def flatten_and_combine(self, input_dict, input_simple):

def characterize_failures_by_options(self, failing_tests):
# User self.failing_tests, looking at options
results = {}
results = defaultdict(list)
results['locale'] = {} # Dictionary of labels for each locale
for test in failing_tests:
# Get input_data, if available
Expand Down Expand Up @@ -564,7 +564,8 @@ def characterize_failures_by_options(self, failing_tests):
except:
continue

for key in ['language_label', 'ignorePunctuation', 'compare_result', 'compare_type', 'test_description']:
options =['language_label', 'ignorePunctuation', 'compare_result', 'compare_type', 'test_description']
for key in options:
try:
if test.get(key): # For collation results
value = test[key]
Expand Down Expand Up @@ -601,7 +602,6 @@ def characterize_failures_by_options(self, failing_tests):

# TODO: Add substitution of [] for ()
# TODO: Add replacing (...) with "-" for numbers
# Sort these by number of items in each set.
# TODO: Find the largest intersections of these sets and sort by size
combo_list = [(combo, len(results[combo])) for combo in results]
combo_list.sort(key=take_second, reverse=True)
Expand Down Expand Up @@ -924,7 +924,7 @@ def summarize_reports(self):
executor = ''

icu_version = os.path.basename(os.path.dirname(dir_path))
test_results = {}
test_results = defaultdict(list)
test_type = None
try:
executor = test_environment['test_language']
Expand Down

0 comments on commit 4fc33ea

Please sign in to comment.