本文整理汇总了Python中unittest.TestCase._MIN_END_LEN方法的典型用法代码示例。如果您正苦于以下问题:Python TestCase._MIN_END_LEN方法的具体用法?Python TestCase._MIN_END_LEN怎么用?Python TestCase._MIN_END_LEN使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类unittest.TestCase
的用法示例。
在下文中一共展示了TestCase._MIN_END_LEN方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: TestCase
# 需要导入模块: from unittest import TestCase [as 别名]
# 或者: from unittest.TestCase import _MIN_END_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)