diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 18:07:41 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 18:07:41 +0000 |
commit | 76926159194e180003aa78de97e5f287bf4325a5 (patch) | |
tree | 2cea7245cdc3f66355900c820c145eba90598766 /tests/test_large_file.py | |
parent | Initial commit. (diff) | |
download | python-apt-76926159194e180003aa78de97e5f287bf4325a5.tar.xz python-apt-76926159194e180003aa78de97e5f287bf4325a5.zip |
Adding upstream version 2.7.6.upstream/2.7.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/test_large_file.py')
-rw-r--r-- | tests/test_large_file.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/test_large_file.py b/tests/test_large_file.py new file mode 100644 index 0000000..87bc9b6 --- /dev/null +++ b/tests/test_large_file.py @@ -0,0 +1,25 @@ +#!/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() |