summaryrefslogtreecommitdiff
path: root/Lib/test/test_struct.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_struct.py')
-rw-r--r--Lib/test/test_struct.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_struct.py b/Lib/test/test_struct.py
index e3a4e21784..7ee47bf6e0 100644
--- a/Lib/test/test_struct.py
+++ b/Lib/test/test_struct.py
@@ -8,6 +8,7 @@ from test.test_support import TestFailed, verbose, run_unittest, catch_warning
import sys
ISBIGENDIAN = sys.byteorder == "big"
+IS32BIT = sys.maxint == 0x7fffffff
del sys
try:
@@ -568,6 +569,13 @@ class StructTest(unittest.TestCase):
for c in '\x01\x7f\xff\x0f\xf0':
self.assertTrue(struct.unpack('>?', c)[0])
+ def test_crasher(self):
+ if IS32BIT:
+ self.assertRaises(MemoryError, struct.pack, "357913941c", "a")
+ else:
+ print "%s test_crasher skipped on 64bit build."
+
+
def test_main():
run_unittest(StructTest)