summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Heller <theller@ctypes.org>2008-08-14 20:04:38 (GMT)
committerThomas Heller <theller@ctypes.org>2008-08-14 20:04:38 (GMT)
commit6d2014ee590aafd90143167bd465b6fb1ab7cf6f (patch)
tree34623472827d054f5ef58ef959a2b8f1d9d2c62c
parent57adf22f6e61783e15932aa5cdf1a555127a293a (diff)
downloadcpython-6d2014ee590aafd90143167bd465b6fb1ab7cf6f.zip
cpython-6d2014ee590aafd90143167bd465b6fb1ab7cf6f.tar.gz
cpython-6d2014ee590aafd90143167bd465b6fb1ab7cf6f.tar.bz2
Try to fix the test on 64-bit platforms.
-rw-r--r--Lib/ctypes/test/test_memfunctions.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/Lib/ctypes/test/test_memfunctions.py b/Lib/ctypes/test/test_memfunctions.py
index 2660cde..836081b 100644
--- a/Lib/ctypes/test/test_memfunctions.py
+++ b/Lib/ctypes/test/test_memfunctions.py
@@ -8,11 +8,10 @@ class MemFunctionsTest(unittest.TestCase):
# convention (which acquires the GIL and checks the Python
# error flag). Provoke an error and catch it; see also issue
# #3554: <http://bugs.python.org/issue3554>
- if hasattr(sys, "maxsize"):
- self.assertRaises((OverflowError, MemoryError),
- lambda: wstring_at(u"foo", sys.maxsize))
- self.assertRaises((OverflowError, MemoryError),
- lambda: string_at("foo", sys.maxsize))
+ self.assertRaises((OverflowError, MemoryError, SystemError),
+ lambda: wstring_at(u"foo", sys.maxint - 1))
+ self.assertRaises((OverflowError, MemoryError, SystemError),
+ lambda: string_at("foo", sys.maxint - 1))
def test_memmove(self):
# large buffers apparently increase the chance that the memory