Skip to content

Commit d46527f

Browse files
authored
Merge pull request elementary-data#526 from elementary-data/fix_fail_rate_bug
fix fail rate bug
2 parents a0e8917 + 44679ec commit d46527f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

elementary/monitor/api/tests/tests.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,9 @@ def get_invocations(
293293
for sub_test_unique_id, sub_test_invocations in grouped_invocations.items():
294294
totals = self._get_test_invocations_totals(sub_test_invocations)
295295
test_invocations[sub_test_unique_id] = InvocationsSchema(
296-
fail_rate=round(totals.errors / len(sub_test_invocations), 2)
296+
fail_rate=round(
297+
(totals.errors + totals.failures) / len(sub_test_invocations), 2
298+
)
297299
if sub_test_invocations
298300
else 0,
299301
totals=totals,

0 commit comments

Comments
 (0)