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


Python test_support._4G属性代码示例

本文整理汇总了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"), "") 
开发者ID:IronLanguages,项目名称:ironpython2,代码行数:10,代码来源:test_bz2.py

示例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"), "") 
开发者ID:IronLanguages,项目名称:ironpython2,代码行数:10,代码来源:test_bz2.py

示例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 
开发者ID:IronLanguages,项目名称:ironpython2,代码行数:9,代码来源:test_hashlib.py

示例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 
开发者ID:IronLanguages,项目名称:ironpython2,代码行数:13,代码来源:test_hashlib.py

示例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 
开发者ID:dxwu,项目名称:BinderFilter,代码行数:8,代码来源:test_hashlib.py

示例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 
开发者ID:dxwu,项目名称:BinderFilter,代码行数:9,代码来源:test_hashlib.py

示例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 
开发者ID:dxwu,项目名称:BinderFilter,代码行数:12,代码来源:test_hashlib.py


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