未验证 提交 c6a8d1fd 编写于 作者: C Cleber Rosa

Merge remote-tracking branch 'apahim/fix_html_report'

Signed-off-by: NCleber Rosa <crosa@redhat.com>
......@@ -78,11 +78,14 @@ class ReportModel(object):
def passed(self):
return self.result.passed
def pass_rate(self):
def warned(self):
return self.result.warned
def rate(self):
total = float(self.result.tests_total)
passed = float(self.result.passed)
succeeded = float(self.result.passed + self.result.warned)
if total > 0:
pr = 100 * (passed / total)
pr = 100 * (succeeded / total)
else:
pr = 0
return "%.2f" % pr
......
......@@ -736,7 +736,7 @@
<td>Cumulative test time</td><td>{{tests_total_time}} s</td>
</tr>
<tr>
<td>Stats</td><td>From {{tests_total}} tests executed, {{passed}} passed (pass rate of {{pass_rate}}%)</td>
<td>Stats</td><td>From {{tests_total}} tests executed, {{passed}} passed and {{warned}} warned (success rate of {{rate}}%)</td>
</tr>
</table>
</div>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册