Kaydet (Commit) 6d2014ee authored tarafından Thomas Heller's avatar Thomas Heller

Try to fix the test on 64-bit platforms.

üst 57adf22f
...@@ -8,11 +8,10 @@ class MemFunctionsTest(unittest.TestCase): ...@@ -8,11 +8,10 @@ class MemFunctionsTest(unittest.TestCase):
# convention (which acquires the GIL and checks the Python # convention (which acquires the GIL and checks the Python
# error flag). Provoke an error and catch it; see also issue # error flag). Provoke an error and catch it; see also issue
# #3554: <http://bugs.python.org/issue3554> # #3554: <http://bugs.python.org/issue3554>
if hasattr(sys, "maxsize"): self.assertRaises((OverflowError, MemoryError, SystemError),
self.assertRaises((OverflowError, MemoryError), lambda: wstring_at(u"foo", sys.maxint - 1))
lambda: wstring_at(u"foo", sys.maxsize)) self.assertRaises((OverflowError, MemoryError, SystemError),
self.assertRaises((OverflowError, MemoryError), lambda: string_at("foo", sys.maxint - 1))
lambda: string_at("foo", sys.maxsize))
def test_memmove(self): def test_memmove(self):
# large buffers apparently increase the chance that the memory # large buffers apparently increase the chance that the memory
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment