[PATCH] tester: Limit branch coverage percentage precision

Alex White alex.white at oarcorp.com
Fri Mar 12 17:19:25 UTC 2021


---
 tester/rt/coverage.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tester/rt/coverage.py b/tester/rt/coverage.py
index 77e5b69..3de0bb5 100644
--- a/tester/rt/coverage.py
+++ b/tester/rt/coverage.py
@@ -181,7 +181,7 @@ class report_gen_html:
                     + '" max="100"></progress></td>' + os.linesep
             row += ' <td>' + summary.branches_uncovered + '</td>' + os.linesep
             row += ' <td>' + summary.branches_total + '</td>' + os.linesep
-            row += ' <td> {:.3%} </td>'.format(summary.percentage_branches_covered)
+            row += ' <td> {:.2%} </td>'.format(summary.percentage_branches_covered)
             spbc = 100 * summary.percentage_branches_covered
             row += ' <td><progress value="{:.3}" max="100"></progress></td>'.format(spbc)
             row += '</tr>' + os.linesep
-- 
2.27.0



More information about the devel mailing list