Skip to content

Commit

Permalink
Suppress testing 64-bit values in OLBTrees on 32 bit machines.
Browse files Browse the repository at this point in the history
Fixes #9 (I hope).
  • Loading branch information
tseaver committed Jan 5, 2015
1 parent 8a53dd4 commit b49be3c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
10 changes: 10 additions & 0 deletions BTrees/tests/common.py
Expand Up @@ -12,6 +12,9 @@
#
##############################################################################

import platform


def _skip_wo_ZODB(test_method): #pragma NO COVER
try:
import ZODB
Expand All @@ -32,6 +35,13 @@ def _dummy(*args):
else:
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):
# Tests common to all types: sets, buckets, and BTrees
Expand Down
2 changes: 2 additions & 0 deletions BTrees/tests/test_OLBTree.py
Expand Up @@ -27,6 +27,7 @@
from .common import Weighted
from .common import itemsToSet
from .common import makeBuilder
from .common import _skip_on_32_bits


class OLBTreeInternalKeyTest(InternalKeysMappingTest, unittest.TestCase):
Expand Down Expand Up @@ -108,6 +109,7 @@ def _makeOne(self):
def getTwoKeys(self):
return "abc", "def"

@_skip_on_32_bits
def test_extremes(self):
from BTrees.tests.common import SMALLEST_64_BITS
from BTrees.tests.common import SMALLEST_POSITIVE_65_BITS
Expand Down
3 changes: 2 additions & 1 deletion CHANGES.rst
Expand Up @@ -4,7 +4,8 @@
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)
Expand Down

0 comments on commit b49be3c

Please sign in to comment.