Commit a2c8eb23 authored by Jim Fulton's avatar Jim Fulton

conditionally disable a part of a test that can't pass on 32-bit systems

parent 8b000381
...@@ -17,6 +17,7 @@ from __future__ import print_function ...@@ -17,6 +17,7 @@ from __future__ import print_function
import doctest import doctest
import re import re
import six import six
import sys
import unittest import unittest
import transaction import transaction
...@@ -1140,13 +1141,14 @@ class EstimatedSizeTests(ZODB.tests.util.TestCase): ...@@ -1140,13 +1141,14 @@ class EstimatedSizeTests(ZODB.tests.util.TestCase):
# ... on connectionB # ... on connectionB
conn = db.open() conn = db.open()
self.assertEqual(conn._cache.cache_size_bytes, expected) self.assertEqual(conn._cache.cache_size_bytes, expected)
# test huge (larger than 4 byte) size limit # test huge (larger than 4 byte) size limit (if possible)
db = databaseFromString("<zodb>\n" if sys.maxsize > (0x1 << 33):
" cache-size-bytes 8GB\n" db = databaseFromString("<zodb>\n"
" <mappingstorage />\n" " cache-size-bytes 8GB\n"
"</zodb>" " <mappingstorage />\n"
) "</zodb>"
self.assertEqual(db.getCacheSizeBytes(), 0x1 << 33) )
self.assertEqual(db.getCacheSizeBytes(), 0x1 << 33)
def test_cache_garbage_collection(self): def test_cache_garbage_collection(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