当前位置: 首页>>代码示例>>Python>>正文


Python TestResult.addSkip方法代码示例

本文整理汇总了Python中unittest.TestResult.addSkip方法的典型用法代码示例。如果您正苦于以下问题:Python TestResult.addSkip方法的具体用法?Python TestResult.addSkip怎么用?Python TestResult.addSkip使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在unittest.TestResult的用法示例。


在下文中一共展示了TestResult.addSkip方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: addSkip

# 需要导入模块: from unittest import TestResult [as 别名]
# 或者: from unittest.TestResult import addSkip [as 别名]
 def addSkip(self, test, reason):
     TestResult.addSkip(self, test, reason)
     if self.verbose:
         self.stream.write("SKIPPED: %s [%s]%s" % (test, reason,
                                                   os.linesep))
         self.stream.flush()
     self.countcall()
开发者ID:mtdx,项目名称:py-utils,代码行数:9,代码来源:testrunner.py

示例2: addSkip

# 需要导入模块: from unittest import TestResult [as 别名]
# 或者: from unittest.TestResult import addSkip [as 别名]
 def addSkip(self, test, reason):
     """Called when a test is skipped."""
     TestResult.addSkip(self, test, reason)
     if self.verbose:
         self.stream.write('skipped (%s)\n' % reason)
     else:
         self.stream.write('s')
         self.stream.flush()
开发者ID:jimmysitu,项目名称:pyclewn,代码行数:10,代码来源:test_support.py

示例3: addSkip

# 需要导入模块: from unittest import TestResult [as 别名]
# 或者: from unittest.TestResult import addSkip [as 别名]
 def addSkip(self, test, reason):
     """
     Public method called if a test was skipped.
     
     @param test reference to the test object
     @param reason reason for skipping the test (string)
     """
     TestResult.addSkip(self, test, reason)
     self.parent.write('{0}{1}\n'.format(
         ResponseUTTestSkipped,
         str((str(test), reason, test.id()))))
开发者ID:paulmadore,项目名称:Eric-IDE,代码行数:13,代码来源:DCTestResult.py

示例4: addSkip

# 需要导入模块: from unittest import TestResult [as 别名]
# 或者: from unittest.TestResult import addSkip [as 别名]
 def addSkip(self, test, err):
     self.skip_count += 1
     TestResult.addSkip(self, test, err)
     _exc_str = self.skipped[-1][1]
     output = self.complete_output()
     self.result.append((3, test, output, _exc_str))
     if self.verbosity > 1:
         sys.stderr.write("S  ")
         sys.stderr.write(str(test))
         sys.stderr.write("\n")
     else:
         sys.stderr.write("S")
开发者ID:dash0002,项目名称:HTMLTestRunner,代码行数:14,代码来源:HTMLTestRunner.py

示例5: addSkip

# 需要导入模块: from unittest import TestResult [as 别名]
# 或者: from unittest.TestResult import addSkip [as 别名]
 def addSkip(self, test, reason):
     _TestResult.addSkip(self, test, reason)
     self.printStatus('TEST-SKIP', test)
开发者ID:InternalError503,项目名称:cyberfox,代码行数:5,代码来源:mozunit.py

示例6: addSkip

# 需要导入模块: from unittest import TestResult [as 别名]
# 或者: from unittest.TestResult import addSkip [as 别名]
 def addSkip(self, test, detail):
     if hasattr(TestResult, 'addSkip'):
         TestResult.addSkip(self, test, detail)
     else:
         self.skips.append((test, detail))
     self.addAResult(test, SKIPPED, 'SKIPPED', detail)
开发者ID:fcofdez,项目名称:buildbot,代码行数:8,代码来源:subunit.py

示例7: addSkip

# 需要导入模块: from unittest import TestResult [as 别名]
# 或者: from unittest.TestResult import addSkip [as 别名]
 def addSkip(self, test, detail):
     if hasattr(TestResult, 'addSkip'):
         TestResult.addSkip(self, test, detail)
     else:
         self.skips.append((test, detail))
开发者ID:Cray,项目名称:buildbot,代码行数:7,代码来源:subunit.py

示例8: addSkip

# 需要导入模块: from unittest import TestResult [as 别名]
# 或者: from unittest.TestResult import addSkip [as 别名]
 def addSkip(self, test, reason):
     TestResult.addSkip(self, test, reason)
     self._color_print("skipped: %s" % reason, BROWN)
开发者ID:giampaolo,项目名称:pyftpdlib,代码行数:5,代码来源:runner.py

示例9: addSkip

# 需要导入模块: from unittest import TestResult [as 别名]
# 或者: from unittest.TestResult import addSkip [as 别名]
 def addSkip(self, test, reason):
     UnitTestResult.addSkip(self, test, reason)
     if self.showAll:
         self._errWrite('skip {0!r}\n'.format(reason))
     elif self.dots:
         self._errWrite('s')
开发者ID:seecr,项目名称:seecr-test,代码行数:8,代码来源:testrunner.py


注:本文中的unittest.TestResult.addSkip方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。