Commit 61daaf8b authored by Tres Seaver's avatar Tres Seaver

Try working around 'long long' overflow.

parent c46a01f1
...@@ -508,12 +508,8 @@ class _Persistent_Base(object): ...@@ -508,12 +508,8 @@ class _Persistent_Base(object):
self.assertEqual(inst._p_estimated_size, 16777215 * 64) self.assertEqual(inst._p_estimated_size, 16777215 * 64)
def test_assign_p_estimated_size_bigger_than_sys_maxint(self): def test_assign_p_estimated_size_bigger_than_sys_maxint(self):
try:
from sys import maxint
except ImportError: #pragma NO COVER PYTHON3
maxint = 2**32 - 1
inst = self._makeOne() inst = self._makeOne()
inst._p_estimated_size = maxint + 1 inst._p_estimated_size = 2**63 -1 #largest 'long long' in C
self.assertEqual(inst._p_estimated_size, 16777215 * 64) self.assertEqual(inst._p_estimated_size, 16777215 * 64)
def test___getattribute___p__names(self): def test___getattribute___p__names(self):
......
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