Commit b49be3c9 authored by Tres Seaver's avatar Tres Seaver

Suppress testing 64-bit values in OLBTrees on 32 bit machines.

Fixes #9 (I hope).
parent 8a53dd40
...@@ -12,6 +12,9 @@ ...@@ -12,6 +12,9 @@
# #
############################################################################## ##############################################################################
import platform
def _skip_wo_ZODB(test_method): #pragma NO COVER def _skip_wo_ZODB(test_method): #pragma NO COVER
try: try:
import ZODB import ZODB
...@@ -32,6 +35,13 @@ def _skip_under_Py3k(test_method): #pragma NO COVER ...@@ -32,6 +35,13 @@ def _skip_under_Py3k(test_method): #pragma NO COVER
else: else:
return test_method return test_method
def _skip_on_32_bits(test_method): #pragma NO COVER
if platform.architecture()[0] == '32bit':
def _dummy(*args):
pass
return _dummy
return test_method
class Base(object): class Base(object):
# Tests common to all types: sets, buckets, and BTrees # Tests common to all types: sets, buckets, and BTrees
......
...@@ -27,6 +27,7 @@ from .common import TestLongIntValues ...@@ -27,6 +27,7 @@ from .common import TestLongIntValues
from .common import Weighted from .common import Weighted
from .common import itemsToSet from .common import itemsToSet
from .common import makeBuilder from .common import makeBuilder
from .common import _skip_on_32_bits
class OLBTreeInternalKeyTest(InternalKeysMappingTest, unittest.TestCase): class OLBTreeInternalKeyTest(InternalKeysMappingTest, unittest.TestCase):
...@@ -108,6 +109,7 @@ class OLBTreeTest(BTreeTests, TestLongIntValues, unittest.TestCase): ...@@ -108,6 +109,7 @@ class OLBTreeTest(BTreeTests, TestLongIntValues, unittest.TestCase):
def getTwoKeys(self): def getTwoKeys(self):
return "abc", "def" return "abc", "def"
@_skip_on_32_bits
def test_extremes(self): def test_extremes(self):
from BTrees.tests.common import SMALLEST_64_BITS from BTrees.tests.common import SMALLEST_64_BITS
from BTrees.tests.common import SMALLEST_POSITIVE_65_BITS from BTrees.tests.common import SMALLEST_POSITIVE_65_BITS
......
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
4.1.2 (unreleased) 4.1.2 (unreleased)
------------------ ------------------
- TBD - Suppress testing 64-bit values in OLBTrees on 32 bit machines.
See: https://github.com/zopefoundation/BTrees/issues/9
4.1.1 (2014-12-27) 4.1.1 (2014-12-27)
......
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