Python test.test_support._4G Examples

The following are 30 code examples of test.test_support._4G(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module test.test_support , or try the search function .
Example #1
Source File: test_bz2.py    From gcblue with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
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"), "") 
Example #2
Source File: test_hashlib.py    From CTFCrackTools with GNU General Public License v3.0 5 votes vote down vote up
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 
Example #3
Source File: test_hashlib.py    From CTFCrackTools with GNU General Public License v3.0 5 votes vote down vote up
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 
Example #4
Source File: test_hashlib.py    From CTFCrackTools with GNU General Public License v3.0 5 votes vote down vote up
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 
Example #5
Source File: test_hashlib.py    From CTFCrackTools with GNU General Public License v3.0 5 votes vote down vote up
def test_case_md5_huge(self, size):
        if size == _4G + 5:
            try:
                self.check('md5', 'A'*size, 'c9af2dff37468ce5dfee8f2cfc0a9c6d')
            except OverflowError:
                pass # 32-bit arch 
Example #6
Source File: test_bz2.py    From CTFCrackTools with GNU General Public License v3.0 5 votes vote down vote up
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"), "") 
Example #7
Source File: test_bz2.py    From CTFCrackTools with GNU General Public License v3.0 5 votes vote down vote up
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"), "") 
Example #8
Source File: test_hashlib.py    From CTFCrackTools-V2 with GNU General Public License v3.0 5 votes vote down vote up
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 
Example #9
Source File: test_hashlib.py    From CTFCrackTools-V2 with GNU General Public License v3.0 5 votes vote down vote up
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 
Example #10
Source File: test_hashlib.py    From CTFCrackTools-V2 with GNU General Public License v3.0 5 votes vote down vote up
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 
Example #11
Source File: test_hashlib.py    From CTFCrackTools-V2 with GNU General Public License v3.0 5 votes vote down vote up
def test_case_md5_huge(self, size):
        if size == _4G + 5:
            try:
                self.check('md5', 'A'*size, 'c9af2dff37468ce5dfee8f2cfc0a9c6d')
            except OverflowError:
                pass # 32-bit arch 
Example #12
Source File: test_bz2.py    From CTFCrackTools-V2 with GNU General Public License v3.0 5 votes vote down vote up
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"), "") 
Example #13
Source File: test_bz2.py    From CTFCrackTools-V2 with GNU General Public License v3.0 5 votes vote down vote up
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"), "") 
Example #14
Source File: test_hashlib.py    From gcblue with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
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 
Example #15
Source File: test_hashlib.py    From gcblue with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
def test_case_sha1_huge(self, size):
        if size == _4G + 5:
            try:
                self.check('sha1', 'A'*size,
                        '87d745c50e6b2879ffa0fb2c930e9fbfe0dc9a5b')
            except OverflowError:
                pass # 32-bit arch 
Example #16
Source File: test_bz2.py    From ironpython2 with Apache License 2.0 5 votes vote down vote up
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"), "") 
Example #17
Source File: test_bz2.py    From gcblue with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
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"), "") 
Example #18
Source File: test_hashlib.py    From oss-ftp with MIT License 5 votes vote down vote up
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 
Example #19
Source File: test_hashlib.py    From oss-ftp with MIT License 5 votes vote down vote up
def test_case_sha1_huge(self, size):
        if size == _4G + 5:
            try:
                self.check('sha1', 'A'*size,
                        '87d745c50e6b2879ffa0fb2c930e9fbfe0dc9a5b')
            except OverflowError:
                pass # 32-bit arch 
Example #20
Source File: test_bz2.py    From oss-ftp with MIT License 5 votes vote down vote up
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"), "") 
Example #21
Source File: test_bz2.py    From oss-ftp with MIT License 5 votes vote down vote up
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"), "") 
Example #22
Source File: test_hashlib.py    From BinderFilter with MIT License 5 votes vote down vote up
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 
Example #23
Source File: test_hashlib.py    From BinderFilter with MIT License 5 votes vote down vote up
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 
Example #24
Source File: test_hashlib.py    From BinderFilter with MIT License 5 votes vote down vote up
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 
Example #25
Source File: test_hashlib.py    From BinderFilter with MIT License 5 votes vote down vote up
def test_case_md5_huge(self, size):
        if size == _4G + 5:
            try:
                self.check('md5', 'A'*size, 'c9af2dff37468ce5dfee8f2cfc0a9c6d')
            except OverflowError:
                pass # 32-bit arch 
Example #26
Source File: test_bz2.py    From BinderFilter with MIT License 5 votes vote down vote up
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"), "") 
Example #27
Source File: test_bz2.py    From BinderFilter with MIT License 5 votes vote down vote up
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"), "") 
Example #28
Source File: test_hashlib.py    From ironpython2 with Apache License 2.0 5 votes vote down vote up
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 
Example #29
Source File: test_hashlib.py    From ironpython2 with Apache License 2.0 5 votes vote down vote up
def test_case_sha1_huge(self, size):
        if size == _4G + 5:
            try:
                self.check('sha1', 'A'*size,
                        '87d745c50e6b2879ffa0fb2c930e9fbfe0dc9a5b')
            except OverflowError:
                pass # 32-bit arch 
Example #30
Source File: test_bz2.py    From ironpython2 with Apache License 2.0 5 votes vote down vote up
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"), "")