Summary fix (#12716)

This commit is contained in:
Irina Efode 2022-08-26 00:24:42 +04:00 committed by GitHub
parent ddf75def93
commit 74567b55a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -136,7 +136,7 @@ def collect_statistic(root: ET.Element, is_conformance_mode: bool):
op_res[op].update({device.tag: device_general_test_count})
else:
op_res.update({op: {device.tag: device_general_test_count}})
pass_rate_avg[device.tag] /= len(covered_ops[device.tag])
pass_rate_avg[device.tag] = 0 if covered_ops[device.tag] == 0 else pass_rate_avg[device.tag] / covered_ops[device.tag]
pass_rate_avg[device.tag] = round(float(pass_rate_avg[device.tag]), 1)
general_pass_rate[device.tag] = 0 if general_test_count[device.tag] == 0 else (general_passed_tests[device.tag] * 100 / general_test_count[device.tag])
general_pass_rate[device.tag] = round(float(general_pass_rate[device.tag]), 1)