本文整理汇总了Python中test.test_support._4G属性的典型用法代码示例。如果您正苦于以下问题:Python test_support._4G属性的具体用法?Python test_support._4G怎么用?Python test_support._4G使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类test.test_support
的用法示例。
在下文中一共展示了test_support._4G属性的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: testBigmem
# 需要导入模块: from test import test_support [as 别名]
# 或者: from test.test_support import _4G [as 别名]
def testBigmem(self, size):
# Issue #14398: decompression fails when output data is >=2GB.
if size < _4G:
self.skipTest("Test needs 5GB of memory to run.")
compressed = bz2.compress("a" * _4G)
text = bz2.BZ2Decompressor().decompress(compressed)
self.assertEqual(len(text), _4G)
self.assertEqual(text.strip("a"), "")
示例2: testDecompressBigmem
# 需要导入模块: from test import test_support [as 别名]
# 或者: from test.test_support import _4G [as 别名]
def testDecompressBigmem(self, size):
# Issue #14398: decompression fails when output data is >=2GB.
if size < _4G:
self.skipTest("Test needs 5GB of memory to run.")
compressed = bz2.compress("a" * _4G)
text = bz2.decompress(compressed)
self.assertEqual(len(text), _4G)
self.assertEqual(text.strip("a"), "")
示例3: test_case_sha1_huge
# 需要导入模块: from test import test_support [as 别名]
# 或者: from test.test_support import _4G [as 别名]
def test_case_sha1_huge(self, size):
if size == _4G + 5:
try:
self.check('sha1', 'A'*size,
'87d745c50e6b2879ffa0fb2c930e9fbfe0dc9a5b')
except OverflowError:
pass # 32-bit arch
示例4: test_case_sha1_huge_update
# 需要导入模块: from test import test_support [as 别名]
# 或者: from test.test_support import _4G [as 别名]
def test_case_sha1_huge_update(self, size):
if size == _4G + 5:
try:
self.check_update('sha1', 'A'*size,
'87d745c50e6b2879ffa0fb2c930e9fbfe0dc9a5b')
except OverflowError:
pass # 32-bit arch
# use the examples from Federal Information Processing Standards
# Publication 180-2, Secure Hash Standard, 2002 August 1
# http://csrc.nist.gov/publications/fips/fips180-2/fips180-2.pdf
示例5: test_case_md5_huge
# 需要导入模块: from test import test_support [as 别名]
# 或者: from test.test_support import _4G [as 别名]
def test_case_md5_huge(self, size):
if size == _4G + 5:
try:
self.check('md5', 'A'*size, 'c9af2dff37468ce5dfee8f2cfc0a9c6d')
except OverflowError:
pass # 32-bit arch
示例6: test_case_md5_huge_update
# 需要导入模块: from test import test_support [as 别名]
# 或者: from test.test_support import _4G [as 别名]
def test_case_md5_huge_update(self, size):
if size == _4G + 5:
try:
self.check_update('md5', 'A'*size,
'c9af2dff37468ce5dfee8f2cfc0a9c6d')
except OverflowError:
pass # 32-bit arch
示例7: test_case_md5_uintmax
# 需要导入模块: from test import test_support [as 别名]
# 或者: from test.test_support import _4G [as 别名]
def test_case_md5_uintmax(self, size):
if size == _4G - 1:
try:
self.check('md5', 'A'*size, '28138d306ff1b8281f1a9067e1a1a2b3')
except OverflowError:
pass # 32-bit arch
# use the three examples from Federal Information Processing Standards
# Publication 180-1, Secure Hash Standard, 1995 April 17
# http://www.itl.nist.gov/div897/pubs/fip180-1.htm