HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //proc/1233/root/home/arjun/python-apt/tests/test_large_file.py
#!/usr/bin/python3

import sys
import unittest

import apt_inst
import testcommon

IS_NOT_32BIT = sys.maxsize > 2**32


@unittest.skipIf(IS_NOT_32BIT, "Large File support is for 32 bit systems")
class testHashes(testcommon.TestCase):
    "test the hashsum functions against strings and files"

    LARGE_PACKAGE_CONTENT = "data/test_debs/large-package-content_1.0_all.deb"

    def testExtractData(self):
        deb = apt_inst.DebFile(self.LARGE_PACKAGE_CONTENT)

        self.assertRaises(MemoryError, deb.data.extractdata, "large-file")


if __name__ == "__main__":
    unittest.main()