summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/data/test_debs/large-package-content_1.0_all.debbin0 -> 781546 bytes
-rw-r--r--tests/test_large_file.py22
2 files changed, 22 insertions, 0 deletions
diff --git a/tests/data/test_debs/large-package-content_1.0_all.deb b/tests/data/test_debs/large-package-content_1.0_all.deb
new file mode 100644
index 00000000..56bdce3d
--- /dev/null
+++ b/tests/data/test_debs/large-package-content_1.0_all.deb
Binary files differ
diff --git a/tests/test_large_file.py b/tests/test_large_file.py
new file mode 100644
index 00000000..2e873131
--- /dev/null
+++ b/tests/test_large_file.py
@@ -0,0 +1,22 @@
+#!/usr/bin/python
+
+import sys
+import unittest
+
+import apt_inst
+
+IS_NOT_32BIT = sys.maxsize > 2**32
+
+@unittest.skipIf(IS_NOT_32BIT, "Large File support is for 32 bit systems")
+class testHashes(unittest.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()