Skip to content

Commit c6c4b4b

Browse files
authored
Fix: use math.floor instead of "round" for scenarios where results are above 95% but not 100%. (#175)
1 parent 956b568 commit c6c4b4b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/integrations/slack/SlackMessages.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import math
12
from typing import Dict
23
from datetime import datetime
34

@@ -52,7 +53,7 @@ def slack_message_style1_subheading(test_results, build_url):
5253
total_tests = test_results.get("total", 0)
5354

5455
try:
55-
green_circles = round((pass_rate / 100) * total_circles)
56+
green_circles = math.floor((pass_rate / 100) * total_circles)
5657
except (TypeError, ZeroDivisionError):
5758
green_circles = 0
5859

0 commit comments

Comments
 (0)