本文整理汇总了Python中mockable_test_result.MockableTestResult类的典型用法代码示例。如果您正苦于以下问题:Python MockableTestResult类的具体用法?Python MockableTestResult怎么用?Python MockableTestResult使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了MockableTestResult类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: addSuccess
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
开发者ID:ruzhytskyi,项目名称:Koans,代码行数:8,代码来源:sensei.py
示例2: startTest
def startTest(self, test):
MockableTestResult.startTest(self, test)
if helper.cls_name(test) != self.prevTestClassName:
self.prevTestClassName = helper.cls_name(test)
if not self.failures:
self.stream.writeln()
self.stream.writeln("Thinking {0}".format(helper.cls_name(test)))
开发者ID:12and1studio,项目名称:Hackbright-Curriculum,代码行数:8,代码来源:sensei.py
示例3: startTest
def startTest(self, test):
MockableTestResult.startTest(self, test)
if helper.cls_name(test) != self.prevTestClassName:
self.prevTestClassName = helper.cls_name(test)
if not self.failures:
self.stream.writeln()
self.stream.writeln("{0}{1}Thinking {2}".format(
Fore.RESET, Style.NORMAL, helper.cls_name(test)))
开发者ID:mattjmorrison,项目名称:python_koans,代码行数:9,代码来源:sensei.py
示例4: startTest
def startTest(self, test):
MockableTestResult.startTest(self, test)
if helper.cls_name(test) != self.prevTestClassName:
self.prevTestClassName = helper.cls_name(test)
if not self.failures:
self.stream.writeln()
self.stream.writeln("{0}{1}Learning {2}".format(Fore.RESET, Style.NORMAL, helper.cls_name(test)))
if helper.cls_name(test) not in ["AboutAsserts", "AboutExtraCredit"]:
self.lesson_pass_count += 1
开发者ID:Renice-Owino,项目名称:Python-advance-tracks,代码行数:10,代码来源:sensei.py
示例5: addSuccess
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
开发者ID:Renice-Owino,项目名称:Python-advance-tracks,代码行数:12,代码来源:sensei.py
示例6: addFailure
def addFailure(self, test, err):
MockableTestResult.addFailure(self, test, err)
开发者ID:ruzhytskyi,项目名称:Koans,代码行数:2,代码来源:sensei.py
示例7: addSuccess
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
开发者ID:12and1studio,项目名称:Hackbright-Curriculum,代码行数:5,代码来源:sensei.py
注:本文中的mockable_test_result.MockableTestResult类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论