本文整理汇总了Python中buildbot.steps.shell.Test.describe方法的典型用法代码示例。如果您正苦于以下问题:Python Test.describe方法的具体用法?Python Test.describe怎么用?Python Test.describe使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类buildbot.steps.shell.Test
的用法示例。
在下文中一共展示了Test.describe方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: describe
# 需要导入模块: from buildbot.steps.shell import Test [as 别名]
# 或者: from buildbot.steps.shell.Test import describe [as 别名]
def describe(self, done=False):
description = Test.describe(self, done)
for name, count in self.logObserver.resultCounts.iteritems():
if name in self.resultNames:
description.append('{0} {1}'.format(count, self.resultNames[name]))
else:
description.append('Unexpected test result output ' + name)
return description
示例2: describe
# 需要导入模块: from buildbot.steps.shell import Test [as 别名]
# 或者: from buildbot.steps.shell.Test import describe [as 别名]
def describe(self, done=False):
description = Test.describe(self, done)
if done:
if self.step_status.hasStatistic("total-statements"):
total_statements = self.step_status.getStatistic("total-statements")
exec_statements = self.step_status.getStatistic("exec-statements")
if total_statements > 0:
coverage_pct = (float(exec_statements) /
float(total_statements) * 100)
description.append('%d%% code coverage (%d / %d statements)'
% (coverage_pct, exec_statements,
total_statements))
return description
示例3: describe
# 需要导入模块: from buildbot.steps.shell import Test [as 别名]
# 或者: from buildbot.steps.shell.Test import describe [as 别名]
def describe(self, done=False):
description = Test.describe(self, done)
for name, count in self.logObserver.resultCounts.iteritems():
description.append('{0} {1}'.format(count, self.resultNames[name]))
return description