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


Python TestCase._MIN_BEGIN_LEN方法代码示例

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


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

示例1: TestCase

# 需要导入模块: from unittest import TestCase [as 别名]
# 或者: from unittest.TestCase import _MIN_BEGIN_LEN [as 别名]

from unittest import TestCase

from .general import WooperAssertionError


assertions = TestCase()
assertions.failureException = WooperAssertionError
assertions._diffThreshold = 2**16
assertions._maxDiff = None
assertions.DIFF_OMITTED = ('\nDiff is %s characters long. '
                           'Set self.maxDiff to None to see it.')
assertions._MAX_LENGTH = 80
assertions._PLACEHOLDER_LEN = 12
assertions._MIN_BEGIN_LEN = 5
assertions._MIN_END_LEN = 5
assertions._MIN_COMMON_LEN = 5


# def assert_is_instance(obj, cls, msg=None):
#     """Same as self.assertTrue(isinstance(obj, cls)), with a nicer
#     default message."""
#     return assertions.assertIsInstance(obj, cls, msg)


def assert_equal(first, second, msg=None):
    """Fail if the two objects are unequal as determined by the '=='
       operator.
    """
    return assertions.assertEqual(first, second, msg=None)
开发者ID:actionless,项目名称:wooper,代码行数:32,代码来源:assertions.py


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