本文整理汇总了Python中mockable_test_result.MockableTestResult.addSuccess方法的典型用法代码示例。如果您正苦于以下问题:Python MockableTestResult.addSuccess方法的具体用法?Python MockableTestResult.addSuccess怎么用?Python MockableTestResult.addSuccess使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mockable_test_result.MockableTestResult
的用法示例。
在下文中一共展示了MockableTestResult.addSuccess方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: addSuccess
# 需要导入模块: from mockable_test_result import MockableTestResult [as 别名]
# 或者: from mockable_test_result.MockableTestResult import addSuccess [as 别名]
def addSuccess(self, test):
if self.passesCount():
MockableTestResult.addSuccess(self, test)
self.stream.writeln( \
" {0}{1}{2} has expanded your awareness.{3}{4}" \
.format(Fore.GREEN, Style.BRIGHT, test._testMethodName, \
Fore.RESET, Style.NORMAL))
self.pass_count += 1
示例2: addSuccess
# 需要导入模块: from mockable_test_result import MockableTestResult [as 别名]
# 或者: from mockable_test_result.MockableTestResult import addSuccess [as 别名]
def addSuccess(self, test):
if self.passesCount():
MockableTestResult.addSuccess(self, test)
import re
test_method = re.sub("test_", "", test._testMethodName)
self.stream.writeln(
" {0}{1} Good Job!! You have finished {2}.{3}{4}".format(
Fore.GREEN, Style.BRIGHT, test_method, Fore.RESET, Style.NORMAL
)
)
self.pass_count += 1
示例3: addSuccess
# 需要导入模块: from mockable_test_result import MockableTestResult [as 别名]
# 或者: from mockable_test_result.MockableTestResult import addSuccess [as 别名]
def addSuccess(self, test):
if self.passesCount():
MockableTestResult.addSuccess(self, test)
self.stream.writeln(" {0} has expanded your awareness.".format(test._testMethodName))
self.pass_count += 1