Commit ece3ff21 authored by Jason Madden's avatar Jason Madden

Remove vestigial test_suite methods.

And other small tweaks to bring test coverage up. Turns out there were several test methods being needlessly skipped.
parent e0a98807
...@@ -77,9 +77,9 @@ before_install: ...@@ -77,9 +77,9 @@ before_install:
fi fi
install: install:
- pip install -U pip setuptools - python -m pip install -U pip setuptools
- if [[ "$WITH_COVERAGE" == "1" ]]; then pip install coveralls coverage; fi - if [[ "$WITH_COVERAGE" == "1" ]]; then python -m pip install coveralls coverage; fi
- pip install -e .[test,ZODB] - python -m pip install -U -e .[test,ZODB]
script: script:
- python --version - python --version
......
...@@ -1054,13 +1054,12 @@ class _Tree(_Base): ...@@ -1054,13 +1054,12 @@ class _Tree(_Base):
): ):
return ((data[0].child.__getstate__(), ), ) return ((data[0].child.__getstate__(), ), )
sdata = []
data = iter(data)
sdata = [next(data).child]
for item in data: for item in data:
if sdata: sdata.append(item.key)
sdata.append(item.key) sdata.append(item.child)
sdata.append(item.child)
else:
sdata.append(item.child)
return tuple(sdata), self._firstbucket return tuple(sdata), self._firstbucket
......
...@@ -13,6 +13,8 @@ ...@@ -13,6 +13,8 @@
############################################################################## ##############################################################################
from __future__ import division from __future__ import division
import sys
import functools
import unittest import unittest
import platform import platform
from unittest import skip from unittest import skip
...@@ -1746,13 +1748,6 @@ class InternalKeysMappingTest(object): ...@@ -1746,13 +1748,6 @@ class InternalKeysMappingTest(object):
db.close() db.close()
class InternalKeysSetTest(object):
# There must not be any internal keys not in the TreeSet
def add_key(self, tree, key):
tree.add(key)
class ModuleTest(object): class ModuleTest(object):
# test for presence of generic names in module # test for presence of generic names in module
prefix = None prefix = None
...@@ -1844,26 +1839,25 @@ class TestLongIntSupport(object): ...@@ -1844,26 +1839,25 @@ class TestLongIntSupport(object):
def getTwoKeys(self): def getTwoKeys(self):
# Return two distinct values, these must compare as un-equal. # Return two distinct values, these must compare as un-equal.
# #
#These values must be usable as keys. # These values must be usable as keys.
return 0, 1 return 0, 1
def _set_value(self, key, value): def _skip_if_not_64bit(self):
t = self._makeOne() mod = sys.modules[self._getTargetClass().__module__]
t[key] = value if not mod.using64bits:
self.skipTest("Needs 64 bit support.") # pragma: no cover
class TestLongIntKeys(TestLongIntSupport): class TestLongIntKeys(TestLongIntSupport):
SUPPORTS_NEGATIVE_KEYS = True
def _makeLong(self, v): def _makeLong(self, v):
try: try:
return long(v) return long(v)
except NameError: #pragma NO COVER Py3k except NameError: # pragma: no cover
return int(v) return int(v)
def testLongIntKeysWork(self): def testLongIntKeysWork(self):
from BTrees.IIBTree import using64bits self._skip_if_not_64bit()
if not using64bits:
return
t = self._makeOne() t = self._makeOne()
o1, o2 = self.getTwoValues() o1, o2 = self.getTwoValues()
assert o1 != o2 assert o1 != o2
...@@ -1880,7 +1874,7 @@ class TestLongIntKeys(TestLongIntSupport): ...@@ -1880,7 +1874,7 @@ class TestLongIntKeys(TestLongIntSupport):
# Test some large key values too: # Test some large key values too:
k1 = SMALLEST_POSITIVE_33_BITS k1 = SMALLEST_POSITIVE_33_BITS
k2 = LARGEST_64_BITS k2 = LARGEST_64_BITS
k3 = SMALLEST_64_BITS k3 = SMALLEST_64_BITS if self.SUPPORTS_NEGATIVE_KEYS else 0
t[k1] = o1 t[k1] = o1
t[k2] = o2 t[k2] = o2
t[k3] = o1 t[k3] = o1
...@@ -1892,23 +1886,22 @@ class TestLongIntKeys(TestLongIntSupport): ...@@ -1892,23 +1886,22 @@ class TestLongIntKeys(TestLongIntSupport):
self.assertEqual(list(t.keys(None,k2)), [k3, 0, k1, k2]) self.assertEqual(list(t.keys(None,k2)), [k3, 0, k1, k2])
def testLongIntKeysOutOfRange(self): def testLongIntKeysOutOfRange(self):
from BTrees.IIBTree import using64bits self._skip_if_not_64bit()
if not using64bits:
return
o1, o2 = self.getTwoValues() o1, o2 = self.getTwoValues()
self.assertRaises( t = self._makeOne()
ValueError, k1 = SMALLEST_POSITIVE_65_BITS if self.SUPPORTS_NEGATIVE_KEYS else 2**64 + 1
self._set_value, SMALLEST_POSITIVE_65_BITS, o1) with self.assertRaises((OverflowError, ValueError)):
self.assertRaises( t[k1] = o1
ValueError,
self._set_value, LARGEST_NEGATIVE_65_BITS, o1) t = self._makeOne()
with self.assertRaises((OverflowError, ValueError)):
t[LARGEST_NEGATIVE_65_BITS] = o1
class TestLongIntValues(TestLongIntSupport):
class TestLongIntValues(TestLongIntSupport):
SUPPORTS_NEGATIVE_VALUES = True
def testLongIntValuesWork(self): def testLongIntValuesWork(self):
from BTrees.IIBTree import using64bits self._skip_if_not_64bit()
if not using64bits:
return
t = self._makeOne() t = self._makeOne()
keys = sorted(self.getTwoKeys()) keys = sorted(self.getTwoKeys())
k1, k2 = keys k1, k2 = keys
...@@ -1926,16 +1919,17 @@ class TestLongIntValues(TestLongIntSupport): ...@@ -1926,16 +1919,17 @@ class TestLongIntValues(TestLongIntSupport):
self.assertEqual(list(t.values(None,None)), [v1, v2]) self.assertEqual(list(t.values(None,None)), [v1, v2])
def testLongIntValuesOutOfRange(self): def testLongIntValuesOutOfRange(self):
from BTrees.IIBTree import using64bits self._skip_if_not_64bit()
if not using64bits:
return
k1, k2 = self.getTwoKeys() k1, k2 = self.getTwoKeys()
self.assertRaises( t = self._makeOne()
ValueError, v1 = SMALLEST_POSITIVE_65_BITS if self.SUPPORTS_NEGATIVE_VALUES else 2**64 + 1
self._set_value, k1, SMALLEST_POSITIVE_65_BITS) with self.assertRaises((OverflowError, ValueError)):
self.assertRaises( t[k1] = v1
ValueError,
self._set_value, k1, LARGEST_NEGATIVE_65_BITS) t = self._makeOne()
with self.assertRaises((OverflowError, ValueError)):
t[k1] = LARGEST_NEGATIVE_65_BITS
# Given a mapping builder (IIBTree, OOBucket, etc), return a function # Given a mapping builder (IIBTree, OOBucket, etc), return a function
# that builds an object of that type given only a list of keys. # that builds an object of that type given only a list of keys.
......
...@@ -230,7 +230,7 @@ class ToBeDeleted(object): ...@@ -230,7 +230,7 @@ class ToBeDeleted(object):
return hash(self.id) return hash(self.id)
class BugFixes(unittest.TestCase): class TestBugFixes(unittest.TestCase):
# Collector 1843. Error returns were effectively ignored in # Collector 1843. Error returns were effectively ignored in
# Bucket_rangeSearch(), leading to "delayed" errors, or worse. # Bucket_rangeSearch(), leading to "delayed" errors, or worse.
...@@ -523,12 +523,3 @@ class FamilyTest(unittest.TestCase): ...@@ -523,12 +523,3 @@ class FamilyTest(unittest.TestCase):
f2, = u.load() f2, = u.load()
self.assertTrue(f1 is family) self.assertTrue(f1 is family)
self.assertTrue(f2 is family) self.assertTrue(f2 is family)
def test_suite():
return unittest.TestSuite((
unittest.makeSuite(DegenerateBTree),
unittest.makeSuite(BugFixes),
unittest.makeSuite(TestCmpError),
unittest.makeSuite(FamilyTest),
))
...@@ -28,7 +28,7 @@ class TestBTreesUnicode(unittest.TestCase): ...@@ -28,7 +28,7 @@ class TestBTreesUnicode(unittest.TestCase):
def setUp(self): def setUp(self):
#setup an OOBTree with some unicode strings #setup an OOBTree with some unicode strings
from BTrees.OOBTree import OOBTree from BTrees.OOBTree import OOBTree
from BTrees._compat import _bytes
self.s = b'dreit\xe4gigen'.decode('latin1') self.s = b'dreit\xe4gigen'.decode('latin1')
...@@ -43,21 +43,18 @@ class TestBTreesUnicode(unittest.TestCase): ...@@ -43,21 +43,18 @@ class TestBTreesUnicode(unittest.TestCase):
self.tree = OOBTree() self.tree = OOBTree()
for k, v in self.data: for k, v in self.data:
if isinstance(k, _bytes): if isinstance(k, bytes):
k = k.decode('latin1') k = k.decode('latin1')
self.tree[k] = v self.tree[k] = v
@_skip_under_Py3k
def testAllKeys(self): def testAllKeys(self):
# check every item of the tree # check every item of the tree
from BTrees._compat import _bytes
for k, v in self.data: for k, v in self.data:
if isinstance(k, _bytes): if isinstance(k, bytes):
k = k.decode(encoding) k = k.decode(encoding)
self.assertTrue(k in self.tree) self.assertIn(k, self.tree)
self.assertEqual(self.tree[k], v) self.assertEqual(self.tree[k], v)
@_skip_under_Py3k
def testUnicodeKeys(self): def testUnicodeKeys(self):
# try to access unicode keys in tree # try to access unicode keys in tree
k, v = self.data[-1] k, v = self.data[-1]
...@@ -65,12 +62,17 @@ class TestBTreesUnicode(unittest.TestCase): ...@@ -65,12 +62,17 @@ class TestBTreesUnicode(unittest.TestCase):
self.assertEqual(self.tree[k], v) self.assertEqual(self.tree[k], v)
self.assertEqual(self.tree[self.s], v) self.assertEqual(self.tree[self.s], v)
@_skip_under_Py3k
def testAsciiKeys(self): def testAsciiKeys(self):
# try to access some "plain ASCII" keys in the tree # try to access some "plain ASCII" keys in the tree;
# they get upconverted to unicode for comparison on Python 2
for k, v in self.data[0], self.data[2]: for k, v in self.data[0], self.data[2]:
self.assertTrue(isinstance(k, str)) self.assertIsInstance(k, bytes)
self.assertEqual(self.tree[k], v) if bytes is str:
self.assertEqual(self.tree[k], v)
else:
with self.assertRaises(TypeError):
self.tree.__getitem__(k)
class TestBTreeBucketUnicode(unittest.TestCase): class TestBTreeBucketUnicode(unittest.TestCase):
...@@ -83,7 +85,3 @@ class TestBTreeBucketUnicode(unittest.TestCase): ...@@ -83,7 +85,3 @@ class TestBTreeBucketUnicode(unittest.TestCase):
bucket = OOBucket(items) bucket = OOBucket(items)
self.assertEqual(repr(bucket), self.assertEqual(repr(bucket),
'BTrees.OOBTree.OOBucket(%s)' % repr(items)) 'BTrees.OOBTree.OOBucket(%s)' % repr(items))
def test_suite():
return unittest.defaultTestLoader.loadTestsFromName(__name__)
...@@ -565,9 +565,3 @@ class NastyConfictFunctionalTests(ConflictTestBase, unittest.TestCase): ...@@ -565,9 +565,3 @@ class NastyConfictFunctionalTests(ConflictTestBase, unittest.TestCase):
tm2.commit() tm2.commit()
self.assertRaises(ConflictError, tm1.commit) self.assertRaises(ConflictError, tm1.commit)
tm1.abort() tm1.abort()
def test_suite():
return unittest.TestSuite((
unittest.makeSuite(NastyConfictFunctionalTests),
))
...@@ -16,7 +16,6 @@ import unittest ...@@ -16,7 +16,6 @@ import unittest
from .common import BTreeTests from .common import BTreeTests
from .common import ExtendedSetTests from .common import ExtendedSetTests
from .common import InternalKeysMappingTest from .common import InternalKeysMappingTest
from .common import InternalKeysSetTest
from .common import MappingBase from .common import MappingBase
from .common import MappingConflictTestBase from .common import MappingConflictTestBase
from .common import ModuleTest from .common import ModuleTest
...@@ -43,20 +42,6 @@ class IFBTreePyInternalKeyTest(InternalKeysMappingTest, unittest.TestCase): ...@@ -43,20 +42,6 @@ class IFBTreePyInternalKeyTest(InternalKeysMappingTest, unittest.TestCase):
return IFBTreePy return IFBTreePy
class IFTreeSetInternalKeyTest(InternalKeysSetTest, unittest.TestCase):
def _getTargetClass(self):
from BTrees.IFBTree import IFTreeSet
return IFTreeSet
class IFTreeSetPyInternalKeyTest(InternalKeysSetTest, unittest.TestCase):
def _getTargetClass(self):
from BTrees.IFBTree import IFTreeSetPy
return IFTreeSetPy
class IFBucketTest(MappingBase, unittest.TestCase): class IFBucketTest(MappingBase, unittest.TestCase):
def _getTargetClass(self): def _getTargetClass(self):
...@@ -345,34 +330,3 @@ class IFModuleTest(ModuleTest, unittest.TestCase): ...@@ -345,34 +330,3 @@ class IFModuleTest(ModuleTest, unittest.TestCase):
def _getInterface(self): def _getInterface(self):
import BTrees.Interfaces import BTrees.Interfaces
return BTrees.Interfaces.IIntegerFloatBTreeModule return BTrees.Interfaces.IIntegerFloatBTreeModule
def test_suite():
return unittest.TestSuite((
unittest.makeSuite(IFBTreeInternalKeyTest),
unittest.makeSuite(IFBTreePyInternalKeyTest),
unittest.makeSuite(IFTreeSetInternalKeyTest),
unittest.makeSuite(IFTreeSetPyInternalKeyTest),
unittest.makeSuite(IFBucketTest),
unittest.makeSuite(IFBucketPyTest),
unittest.makeSuite(IFTreeSetTest),
unittest.makeSuite(IFTreeSetPyTest),
unittest.makeSuite(IFSetTest),
unittest.makeSuite(IFSetPyTest),
unittest.makeSuite(IFBTreeTest),
unittest.makeSuite(IFBTreePyTest),
unittest.makeSuite(TestIFBTrees),
unittest.makeSuite(TestIFBTreesPy),
unittest.makeSuite(TestIFMultiUnion),
unittest.makeSuite(TestIFMultiUnionPy),
unittest.makeSuite(PureIF),
unittest.makeSuite(PureIFPy),
unittest.makeSuite(IFBTreeConflictTests),
unittest.makeSuite(IFBTreePyConflictTests),
unittest.makeSuite(IFBucketConflictTests),
unittest.makeSuite(IFBucketPyConflictTests),
unittest.makeSuite(IFTreeSetConflictTests),
unittest.makeSuite(IFTreeSetPyConflictTests),
unittest.makeSuite(IFSetConflictTests),
unittest.makeSuite(IFSetPyConflictTests),
unittest.makeSuite(IFModuleTest),
))
...@@ -17,7 +17,6 @@ from .common import BTreeTests ...@@ -17,7 +17,6 @@ from .common import BTreeTests
from .common import ExtendedSetTests from .common import ExtendedSetTests
from .common import I_SetsBase from .common import I_SetsBase
from .common import InternalKeysMappingTest from .common import InternalKeysMappingTest
from .common import InternalKeysSetTest
from .common import MappingBase from .common import MappingBase
from .common import MappingConflictTestBase from .common import MappingConflictTestBase
from .common import ModuleTest from .common import ModuleTest
...@@ -32,14 +31,14 @@ from .common import itemsToSet ...@@ -32,14 +31,14 @@ from .common import itemsToSet
from .common import makeBuilder from .common import makeBuilder
from BTrees.IIBTree import using64bits #XXX Ugly, but unavoidable from BTrees.IIBTree import using64bits #XXX Ugly, but unavoidable
class IIBTreeInternalKeyTest(InternalKeysMappingTest, unittest.TestCase): class IIBTreeInternalKeyTest(InternalKeysMappingTest, unittest.TestCase):
def _getTargetClass(self): def _getTargetClass(self):
from BTrees.IIBTree import IIBTree from BTrees.IIBTree import IIBTree
return IIBTree return IIBTree
class IIBTreePyInternalKeyTest(InternalKeysMappingTest, unittest.TestCase): class IIBTreePyInternalKeyTest(InternalKeysMappingTest, unittest.TestCase):
def _getTargetClass(self): def _getTargetClass(self):
...@@ -47,19 +46,6 @@ class IIBTreePyInternalKeyTest(InternalKeysMappingTest, unittest.TestCase): ...@@ -47,19 +46,6 @@ class IIBTreePyInternalKeyTest(InternalKeysMappingTest, unittest.TestCase):
return IIBTreePy return IIBTreePy
class IITreeSetInternalKeyTest(InternalKeysSetTest, unittest.TestCase):
def _getTargetClass(self):
from BTrees.IIBTree import IITreeSet
return IITreeSet
class IITreeSetPyInternalKeyTest(InternalKeysSetTest, unittest.TestCase):
def _getTargetClass(self):
from BTrees.IIBTree import IITreeSetPy
return IITreeSetPy
class IIBucketTest(MappingBase, unittest.TestCase): class IIBucketTest(MappingBase, unittest.TestCase):
...@@ -466,42 +452,3 @@ class IIModuleTest(ModuleTest, unittest.TestCase): ...@@ -466,42 +452,3 @@ class IIModuleTest(ModuleTest, unittest.TestCase):
def _getInterface(self): def _getInterface(self):
import BTrees.Interfaces import BTrees.Interfaces
return BTrees.Interfaces.IIntegerIntegerBTreeModule return BTrees.Interfaces.IIntegerIntegerBTreeModule
def test_suite():
return unittest.TestSuite((
unittest.makeSuite(IIBTreeInternalKeyTest),
unittest.makeSuite(IIBTreePyInternalKeyTest),
unittest.makeSuite(IITreeSetInternalKeyTest),
unittest.makeSuite(IITreeSetPyInternalKeyTest),
unittest.makeSuite(IIBucketTest),
unittest.makeSuite(IIBucketPyTest),
unittest.makeSuite(IITreeSetTest),
unittest.makeSuite(IITreeSetPyTest),
unittest.makeSuite(IISetTest),
unittest.makeSuite(IISetPyTest),
unittest.makeSuite(IIBTreeTest),
unittest.makeSuite(IIBTreeTestPy),
unittest.makeSuite(TestIIBTrees),
unittest.makeSuite(TestIIBTreesPy),
unittest.makeSuite(TestIISets),
unittest.makeSuite(TestIISetsPy),
unittest.makeSuite(TestIITreeSets),
unittest.makeSuite(TestIITreeSetsPy),
unittest.makeSuite(TestIIMultiUnion),
unittest.makeSuite(TestIIMultiUnionPy),
unittest.makeSuite(PureII),
unittest.makeSuite(PureIIPy),
unittest.makeSuite(TestWeightedII),
unittest.makeSuite(TestWeightedIIPy),
unittest.makeSuite(IIBTreeConflictTests),
unittest.makeSuite(IIBTreeConflictTestsPy),
unittest.makeSuite(IIBucketConflictTests),
unittest.makeSuite(IIBucketConflictTestsPy),
unittest.makeSuite(IITreeSetConflictTests),
unittest.makeSuite(IITreeSetConflictTestsPy),
unittest.makeSuite(IISetConflictTests),
unittest.makeSuite(IISetConflictTestsPy),
unittest.makeSuite(IIModuleTest),
))
...@@ -17,7 +17,6 @@ from .common import BTreeTests ...@@ -17,7 +17,6 @@ from .common import BTreeTests
from .common import ExtendedSetTests from .common import ExtendedSetTests
from .common import I_SetsBase from .common import I_SetsBase
from .common import InternalKeysMappingTest from .common import InternalKeysMappingTest
from .common import InternalKeysSetTest
from .common import MappingBase from .common import MappingBase
from .common import MappingConflictTestBase from .common import MappingConflictTestBase
from .common import ModuleTest from .common import ModuleTest
...@@ -45,20 +44,6 @@ class IOBTreePyInternalKeyTest(InternalKeysMappingTest, unittest.TestCase): ...@@ -45,20 +44,6 @@ class IOBTreePyInternalKeyTest(InternalKeysMappingTest, unittest.TestCase):
return IOBTreePy return IOBTreePy
class IOTreeSetInternalKeyTest(InternalKeysSetTest, unittest.TestCase):
def _getTargetClass(self):
from BTrees.IOBTree import IOTreeSet
return IOTreeSet
class IOTreeSetPyInternalKeyTest(InternalKeysSetTest, unittest.TestCase):
def _getTargetClass(self):
from BTrees.IOBTree import IOTreeSetPy
return IOTreeSetPy
class IOBucketTest(MappingBase, unittest.TestCase): class IOBucketTest(MappingBase, unittest.TestCase):
def _getTargetClass(self): def _getTargetClass(self):
...@@ -376,39 +361,3 @@ class IOModuleTest(ModuleTest, unittest.TestCase): ...@@ -376,39 +361,3 @@ class IOModuleTest(ModuleTest, unittest.TestCase):
pass pass
else: else:
self.fail("IOBTree shouldn't have weightedIntersection") self.fail("IOBTree shouldn't have weightedIntersection")
def test_suite():
return unittest.TestSuite((
unittest.makeSuite(IOBTreeInternalKeyTest),
unittest.makeSuite(IOBTreePyInternalKeyTest),
unittest.makeSuite(IOTreeSetInternalKeyTest),
unittest.makeSuite(IOTreeSetPyInternalKeyTest),
unittest.makeSuite(IOBucketTest),
unittest.makeSuite(IOBucketPyTest),
unittest.makeSuite(IOTreeSetTest),
unittest.makeSuite(IOTreeSetPyTest),
unittest.makeSuite(IOSetTest),
unittest.makeSuite(IOSetPyTest),
unittest.makeSuite(IOBTreeTest),
unittest.makeSuite(IOBTreePyTest),
unittest.makeSuite(TestIOBTrees),
unittest.makeSuite(TestIOBTreesPy),
unittest.makeSuite(TestIOSets),
unittest.makeSuite(TestIOSetsPy),
unittest.makeSuite(TestIOTreeSets),
unittest.makeSuite(TestIOTreeSetsPy),
unittest.makeSuite(TestIOMultiUnion),
unittest.makeSuite(TestIOMultiUnionPy),
unittest.makeSuite(PureIO),
unittest.makeSuite(PureIOPy),
unittest.makeSuite(IOBTreeConflictTests),
unittest.makeSuite(IOBTreeConflictTestsPy),
unittest.makeSuite(IOBucketConflictTests),
unittest.makeSuite(IOBucketConflictTestsPy),
unittest.makeSuite(IOTreeSetConflictTests),
unittest.makeSuite(IOTreeSetConflictTestsPy),
unittest.makeSuite(IOSetConflictTests),
unittest.makeSuite(IOSetConflictTestsPy),
unittest.makeSuite(IOModuleTest),
))
...@@ -16,7 +16,6 @@ import unittest ...@@ -16,7 +16,6 @@ import unittest
from .common import BTreeTests from .common import BTreeTests
from .common import ExtendedSetTests from .common import ExtendedSetTests
from .common import InternalKeysMappingTest from .common import InternalKeysMappingTest
from .common import InternalKeysSetTest
from .common import MappingBase from .common import MappingBase
from .common import MappingConflictTestBase from .common import MappingConflictTestBase
from .common import ModuleTest from .common import ModuleTest
...@@ -42,20 +41,6 @@ class LFBTreePyInternalKeyTest(InternalKeysMappingTest, unittest.TestCase): ...@@ -42,20 +41,6 @@ class LFBTreePyInternalKeyTest(InternalKeysMappingTest, unittest.TestCase):
return LFBTreePy return LFBTreePy
class LFTreeSetInternalKeyTest(InternalKeysSetTest, unittest.TestCase):
def _getTargetClass(self):
from BTrees.LFBTree import LFTreeSet
return LFTreeSet
class LFTreeSetPyInternalKeyTest(InternalKeysSetTest, unittest.TestCase):
def _getTargetClass(self):
from BTrees.LFBTree import LFTreeSetPy
return LFTreeSetPy
class LFBucketTest(MappingBase, unittest.TestCase): class LFBucketTest(MappingBase, unittest.TestCase):
def _getTargetClass(self): def _getTargetClass(self):
...@@ -284,33 +269,3 @@ class LFModuleTest(ModuleTest, unittest.TestCase): ...@@ -284,33 +269,3 @@ class LFModuleTest(ModuleTest, unittest.TestCase):
def _getInterface(self): def _getInterface(self):
import BTrees.Interfaces import BTrees.Interfaces
return BTrees.Interfaces.IIntegerFloatBTreeModule return BTrees.Interfaces.IIntegerFloatBTreeModule
def test_suite():
return unittest.TestSuite((
unittest.makeSuite(LFBTreeInternalKeyTest),
unittest.makeSuite(LFBTreePyInternalKeyTest),
unittest.makeSuite(LFTreeSetInternalKeyTest),
unittest.makeSuite(LFTreeSetPyInternalKeyTest),
unittest.makeSuite(LFBucketTest),
unittest.makeSuite(LFBucketPyTest),
unittest.makeSuite(LFTreeSetTest),
unittest.makeSuite(LFTreeSetPyTest),
unittest.makeSuite(LFSetTest),
unittest.makeSuite(LFSetPyTest),
unittest.makeSuite(LFBTreeTest),
unittest.makeSuite(LFBTreePyTest),
unittest.makeSuite(TestLFMultiUnion),
unittest.makeSuite(TestLFMultiUnionPy),
unittest.makeSuite(PureLF),
unittest.makeSuite(PureLFPy),
unittest.makeSuite(LFBTreeConflictTests),
unittest.makeSuite(LFBTreeConflictTestsPy),
unittest.makeSuite(LFBucketConflictTests),
unittest.makeSuite(LFBucketConflictTestsPy),
unittest.makeSuite(LFTreeSetConflictTests),
unittest.makeSuite(LFTreeSetConflictTestsPy),
unittest.makeSuite(LFSetConflictTests),
unittest.makeSuite(LFSetConflictTestsPy),
unittest.makeSuite(LFModuleTest),
))
...@@ -17,7 +17,6 @@ from .common import BTreeTests ...@@ -17,7 +17,6 @@ from .common import BTreeTests
from .common import ExtendedSetTests from .common import ExtendedSetTests
from .common import I_SetsBase from .common import I_SetsBase
from .common import InternalKeysMappingTest from .common import InternalKeysMappingTest
from .common import InternalKeysSetTest
from .common import MappingBase from .common import MappingBase
from .common import MappingConflictTestBase from .common import MappingConflictTestBase
from .common import ModuleTest from .common import ModuleTest
...@@ -46,20 +45,6 @@ class LLBTreePyInternalKeyTest(InternalKeysMappingTest, unittest.TestCase): ...@@ -46,20 +45,6 @@ class LLBTreePyInternalKeyTest(InternalKeysMappingTest, unittest.TestCase):
return LLBTreePy return LLBTreePy
class LLTreeSetInternalKeyTest(InternalKeysSetTest, unittest.TestCase):
def _getTargetClass(self):
from BTrees.LLBTree import LLTreeSet
return LLTreeSet
class LLTreeSetPyInternalKeyTest(InternalKeysSetTest, unittest.TestCase):
def _getTargetClass(self):
from BTrees.LLBTree import LLTreeSetPy
return LLTreeSetPy
class LLBucketTest(MappingBase, unittest.TestCase): class LLBucketTest(MappingBase, unittest.TestCase):
def _getTargetClass(self): def _getTargetClass(self):
...@@ -377,39 +362,3 @@ class LLModuleTest(ModuleTest, unittest.TestCase): ...@@ -377,39 +362,3 @@ class LLModuleTest(ModuleTest, unittest.TestCase):
def _getInterface(self): def _getInterface(self):
import BTrees.Interfaces import BTrees.Interfaces
return BTrees.Interfaces.IIntegerIntegerBTreeModule return BTrees.Interfaces.IIntegerIntegerBTreeModule
def test_suite():
return unittest.TestSuite((
unittest.makeSuite(LLBTreeInternalKeyTest),
unittest.makeSuite(LLBTreeInternalKeyTest),
unittest.makeSuite(LLTreeSetInternalKeyTest),
unittest.makeSuite(LLTreeSetInternalKeyTest),
unittest.makeSuite(LLBucketTest),
unittest.makeSuite(LLBucketTest),
unittest.makeSuite(LLTreeSetTest),
unittest.makeSuite(LLTreeSetTest),
unittest.makeSuite(LLSetTest),
unittest.makeSuite(LLSetTest),
unittest.makeSuite(LLBTreeTest),
unittest.makeSuite(LLBTreeTest),
unittest.makeSuite(TestLLSets),
unittest.makeSuite(TestLLSets),
unittest.makeSuite(TestLLTreeSets),
unittest.makeSuite(TestLLTreeSets),
unittest.makeSuite(TestLLMultiUnion),
unittest.makeSuite(TestLLMultiUnion),
unittest.makeSuite(PureLL),
unittest.makeSuite(PureLL),
unittest.makeSuite(TestWeightedLL),
unittest.makeSuite(TestWeightedLL),
unittest.makeSuite(LLBTreeConflictTests),
unittest.makeSuite(LLBTreeConflictTests),
unittest.makeSuite(LLBucketConflictTests),
unittest.makeSuite(LLBucketConflictTests),
unittest.makeSuite(LLTreeSetConflictTests),
unittest.makeSuite(LLTreeSetConflictTests),
unittest.makeSuite(LLSetConflictTests),
unittest.makeSuite(LLSetConflictTests),
unittest.makeSuite(LLModuleTest),
))
...@@ -17,7 +17,6 @@ from .common import BTreeTests ...@@ -17,7 +17,6 @@ from .common import BTreeTests
from .common import ExtendedSetTests from .common import ExtendedSetTests
from .common import I_SetsBase from .common import I_SetsBase
from .common import InternalKeysMappingTest from .common import InternalKeysMappingTest
from .common import InternalKeysSetTest
from .common import MappingBase from .common import MappingBase
from .common import MappingConflictTestBase from .common import MappingConflictTestBase
from .common import ModuleTest from .common import ModuleTest
...@@ -43,20 +42,6 @@ class LOBTreePyInternalKeyTest(InternalKeysMappingTest, unittest.TestCase): ...@@ -43,20 +42,6 @@ class LOBTreePyInternalKeyTest(InternalKeysMappingTest, unittest.TestCase):
return LOBTreePy return LOBTreePy
class LOTreeSetInternalKeyTest(InternalKeysSetTest, unittest.TestCase):
def _getTargetClass(self):
from BTrees.LOBTree import LOTreeSet
return LOTreeSet
class LOTreeSetPyInternalKeyTest(InternalKeysSetTest, unittest.TestCase):
def _getTargetClass(self):
from BTrees.LOBTree import LOTreeSetPy
return LOTreeSetPy
class LOBucketTest(MappingBase, unittest.TestCase): class LOBucketTest(MappingBase, unittest.TestCase):
def _getTargetClass(self): def _getTargetClass(self):
...@@ -323,37 +308,3 @@ class LOModuleTest(ModuleTest, unittest.TestCase): ...@@ -323,37 +308,3 @@ class LOModuleTest(ModuleTest, unittest.TestCase):
pass pass
else: else:
self.fail("LOBTree shouldn't have weightedIntersection") self.fail("LOBTree shouldn't have weightedIntersection")
def test_suite():
return unittest.TestSuite((
unittest.makeSuite(LOBTreeInternalKeyTest),
unittest.makeSuite(LOBTreePyInternalKeyTest),
unittest.makeSuite(LOTreeSetInternalKeyTest),
unittest.makeSuite(LOTreeSetPyInternalKeyTest),
unittest.makeSuite(LOBucketTest),
unittest.makeSuite(LOBucketPyTest),
unittest.makeSuite(LOTreeSetTest),
unittest.makeSuite(LOTreeSetPyTest),
unittest.makeSuite(LOSetTest),
unittest.makeSuite(LOSetPyTest),
unittest.makeSuite(LOBTreeTest),
unittest.makeSuite(LOBTreePyTest),
unittest.makeSuite(TestLOSets),
unittest.makeSuite(TestLOSetsPy),
unittest.makeSuite(TestLOTreeSets),
unittest.makeSuite(TestLOTreeSetsPy),
unittest.makeSuite(TestLOMultiUnion),
unittest.makeSuite(TestLOMultiUnionPy),
unittest.makeSuite(PureLO),
unittest.makeSuite(PureLOPy),
unittest.makeSuite(LOBTreeConflictTests),
unittest.makeSuite(LOBTreeConflictTestsPy),
unittest.makeSuite(LOBucketConflictTests),
unittest.makeSuite(LOBucketConflictTestsPy),
unittest.makeSuite(LOTreeSetConflictTests),
unittest.makeSuite(LOTreeSetConflictTestsPy),
unittest.makeSuite(LOSetConflictTests),
unittest.makeSuite(LOSetConflictTestsPy),
unittest.makeSuite(LOModuleTest),
))
...@@ -16,7 +16,7 @@ import unittest ...@@ -16,7 +16,7 @@ import unittest
_marker = object() _marker = object()
class LengthTestCase(unittest.TestCase): class TestLength(unittest.TestCase):
def _getTargetClass(self): def _getTargetClass(self):
from BTrees.Length import Length from BTrees.Length import Length
...@@ -104,7 +104,3 @@ class LengthTestCase(unittest.TestCase): ...@@ -104,7 +104,3 @@ class LengthTestCase(unittest.TestCase):
length = self._makeOne() length = self._makeOne()
other = copy.copy(length) other = copy.copy(length)
self.assertEqual(other(), 0) self.assertEqual(other(), 0)
def test_suite():
return unittest.makeSuite(LengthTestCase)
...@@ -16,7 +16,6 @@ import unittest ...@@ -16,7 +16,6 @@ import unittest
from .common import BTreeTests from .common import BTreeTests
from .common import ExtendedSetTests from .common import ExtendedSetTests
from .common import InternalKeysMappingTest from .common import InternalKeysMappingTest
from .common import InternalKeysSetTest
from .common import MappingBase from .common import MappingBase
from .common import MappingConflictTestBase from .common import MappingConflictTestBase
from .common import ModuleTest from .common import ModuleTest
...@@ -28,7 +27,7 @@ from .common import TypeTest ...@@ -28,7 +27,7 @@ from .common import TypeTest
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 BTrees.IIBTree import using64bits #XXX Ugly, but necessary from BTrees.OIBTree import using64bits #XXX Ugly, but necessary
class OIBTreeInternalKeyTest(InternalKeysMappingTest, unittest.TestCase): class OIBTreeInternalKeyTest(InternalKeysMappingTest, unittest.TestCase):
...@@ -45,20 +44,6 @@ class OIBTreePyInternalKeyTest(InternalKeysMappingTest, unittest.TestCase): ...@@ -45,20 +44,6 @@ class OIBTreePyInternalKeyTest(InternalKeysMappingTest, unittest.TestCase):
return OIBTreePy return OIBTreePy
class OITreeSetInternalKeyTest(InternalKeysSetTest, unittest.TestCase):
def _getTargetClass(self):
from BTrees.OIBTree import OITreeSet
return OITreeSet
class OITreeSetPyInternalKeyTest(InternalKeysSetTest, unittest.TestCase):
def _getTargetClass(self):
from BTrees.OIBTree import OITreeSetPy
return OITreeSetPy
class OIBucketTest(MappingBase, unittest.TestCase): class OIBucketTest(MappingBase, unittest.TestCase):
def _getTargetClass(self): def _getTargetClass(self):
...@@ -349,35 +334,3 @@ class OIModuleTest(ModuleTest, unittest.TestCase): ...@@ -349,35 +334,3 @@ class OIModuleTest(ModuleTest, unittest.TestCase):
pass pass
else: else:
self.fail("OIBTree shouldn't have multiunion") self.fail("OIBTree shouldn't have multiunion")
def test_suite():
return unittest.TestSuite((
unittest.makeSuite(OIBTreeInternalKeyTest),
unittest.makeSuite(OIBTreePyInternalKeyTest),
unittest.makeSuite(OITreeSetInternalKeyTest),
unittest.makeSuite(OITreeSetPyInternalKeyTest),
unittest.makeSuite(OIBucketTest),
unittest.makeSuite(OIBucketPyTest),
unittest.makeSuite(OITreeSetTest),
unittest.makeSuite(OITreeSetPyTest),
unittest.makeSuite(OISetTest),
unittest.makeSuite(OISetPyTest),
unittest.makeSuite(OIBTreeTest),
unittest.makeSuite(OIBTreePyTest),
unittest.makeSuite(TestOIBTrees),
unittest.makeSuite(TestOIBTreesPy),
unittest.makeSuite(PureOI),
unittest.makeSuite(PureOIPy),
unittest.makeSuite(TestWeightedOI),
unittest.makeSuite(TestWeightedOIPy),
unittest.makeSuite(OIBucketConflictTests),
unittest.makeSuite(OIBucketConflictTestsPy),
unittest.makeSuite(OISetConflictTests),
unittest.makeSuite(OISetConflictTestsPy),
unittest.makeSuite(OIBTreeConflictTests),
unittest.makeSuite(OIBTreeConflictTestsPy),
unittest.makeSuite(OITreeSetConflictTests),
unittest.makeSuite(OITreeSetConflictTestsPy),
unittest.makeSuite(OIModuleTest),
))
...@@ -16,7 +16,6 @@ import unittest ...@@ -16,7 +16,6 @@ import unittest
from .common import BTreeTests from .common import BTreeTests
from .common import ExtendedSetTests from .common import ExtendedSetTests
from .common import InternalKeysMappingTest from .common import InternalKeysMappingTest
from .common import InternalKeysSetTest
from .common import MappingBase from .common import MappingBase
from .common import MappingConflictTestBase from .common import MappingConflictTestBase
from .common import ModuleTest from .common import ModuleTest
...@@ -44,20 +43,6 @@ class OLBTreePyInternalKeyTest(InternalKeysMappingTest, unittest.TestCase): ...@@ -44,20 +43,6 @@ class OLBTreePyInternalKeyTest(InternalKeysMappingTest, unittest.TestCase):
return OLBTreePy return OLBTreePy
class OLTreeSetInternalKeyTest(InternalKeysSetTest, unittest.TestCase):
def _getTargetClass(self):
from BTrees.OLBTree import OLTreeSet
return OLTreeSet
class OLTreeSetPyInternalKeyTest(InternalKeysSetTest, unittest.TestCase):
def _getTargetClass(self):
from BTrees.OLBTree import OLTreeSetPy
return OLTreeSetPy
class OLBucketTest(MappingBase, unittest.TestCase): class OLBucketTest(MappingBase, unittest.TestCase):
def _getTargetClass(self): def _getTargetClass(self):
...@@ -316,33 +301,3 @@ class OLModuleTest(ModuleTest, unittest.TestCase): ...@@ -316,33 +301,3 @@ class OLModuleTest(ModuleTest, unittest.TestCase):
pass pass
else: else:
self.fail("OLBTree shouldn't have multiunion") self.fail("OLBTree shouldn't have multiunion")
def test_suite():
return unittest.TestSuite((
unittest.makeSuite(OLBTreeInternalKeyTest),
unittest.makeSuite(OLBTreePyInternalKeyTest),
unittest.makeSuite(OLTreeSetInternalKeyTest),
unittest.makeSuite(OLTreeSetPyInternalKeyTest),
unittest.makeSuite(OLBucketTest),
unittest.makeSuite(OLBucketPyTest),
unittest.makeSuite(OLTreeSetTest),
unittest.makeSuite(OLTreeSetPyTest),
unittest.makeSuite(OLSetTest),
unittest.makeSuite(OLSetPyTest),
unittest.makeSuite(OLBTreeTest),
unittest.makeSuite(OLBTreePyTest),
unittest.makeSuite(PureOL),
unittest.makeSuite(PureOLPy),
unittest.makeSuite(TestWeightedOL),
unittest.makeSuite(TestWeightedOLPy),
unittest.makeSuite(OLBucketConflictTests),
unittest.makeSuite(OLBucketPyConflictTests),
unittest.makeSuite(OLSetConflictTests),
unittest.makeSuite(OLSetPyConflictTests),
unittest.makeSuite(OLBTreeConflictTests),
unittest.makeSuite(OLBTreePyConflictTests),
unittest.makeSuite(OLTreeSetConflictTests),
unittest.makeSuite(OLTreeSetPyConflictTests),
unittest.makeSuite(OLModuleTest),
))
...@@ -17,7 +17,6 @@ from .common import _skip_under_Py3k ...@@ -17,7 +17,6 @@ from .common import _skip_under_Py3k
from .common import BTreeTests from .common import BTreeTests
from .common import ExtendedSetTests from .common import ExtendedSetTests
from .common import InternalKeysMappingTest from .common import InternalKeysMappingTest
from .common import InternalKeysSetTest
from .common import MappingBase from .common import MappingBase
from .common import MappingConflictTestBase from .common import MappingConflictTestBase
from .common import ModuleTest from .common import ModuleTest
...@@ -41,20 +40,6 @@ class OOBTreePyInternalKeyTest(InternalKeysMappingTest, unittest.TestCase): ...@@ -41,20 +40,6 @@ class OOBTreePyInternalKeyTest(InternalKeysMappingTest, unittest.TestCase):
return OOBTree return OOBTree
class OOTreeSetInternalKeyTest(InternalKeysSetTest, unittest.TestCase):
def _getTargetClass(self):
from BTrees.OOBTree import OOTreeSet
return OOTreeSet
class OOTreeSetPyInternalKeyTest(InternalKeysSetTest, unittest.TestCase):
def _getTargetClass(self):
from BTrees.OOBTree import OOTreeSetPy
return OOTreeSetPy
class OOBucketTest(MappingBase, unittest.TestCase): class OOBucketTest(MappingBase, unittest.TestCase):
def _getTargetClass(self): def _getTargetClass(self):
...@@ -187,7 +172,6 @@ class OOBTreeTest(BTreeTests, unittest.TestCase): ...@@ -187,7 +172,6 @@ class OOBTreeTest(BTreeTests, unittest.TestCase):
self.assertEqual(list(union(t, t2)), list(t2)) self.assertEqual(list(union(t, t2)), list(t2))
self.assertEqual(list(intersection(t, t2)), list(t)) self.assertEqual(list(intersection(t, t2)), list(t))
@_skip_under_Py3k
def testDeleteNoneKey(self): def testDeleteNoneKey(self):
# Check that a None key can be deleted in Python 2. # Check that a None key can be deleted in Python 2.
# This doesn't work on Python 3 because None is unorderable, # This doesn't work on Python 3 because None is unorderable,
...@@ -223,11 +207,7 @@ class OOBTreeTest(BTreeTests, unittest.TestCase): ...@@ -223,11 +207,7 @@ class OOBTreeTest(BTreeTests, unittest.TestCase):
def __eq__(self, other): def __eq__(self, other):
return False return False
def __cmp__(self, other): __lt__ = __cmp__ = __eq__
return 1
def __lt__(self, other):
return False
t = self._makeOne() t = self._makeOne()
bad_key = Bad() bad_key = Bad()
...@@ -389,31 +369,3 @@ class OOModuleTest(ModuleTest, unittest.TestCase): ...@@ -389,31 +369,3 @@ class OOModuleTest(ModuleTest, unittest.TestCase):
pass pass
else: else:
self.fail("OOBTree shouldn't have multiunion") self.fail("OOBTree shouldn't have multiunion")
def test_suite():
return unittest.TestSuite((
unittest.makeSuite(OOBTreeInternalKeyTest),
unittest.makeSuite(OOBTreePyInternalKeyTest),
unittest.makeSuite(OOTreeSetInternalKeyTest),
unittest.makeSuite(OOTreeSetPyInternalKeyTest),
unittest.makeSuite(OOBucketTest),
unittest.makeSuite(OOBucketPyTest),
unittest.makeSuite(OOTreeSetTest),
unittest.makeSuite(OOTreeSetPyTest),
unittest.makeSuite(OOSetTest),
unittest.makeSuite(OOSetPyTest),
unittest.makeSuite(OOBTreeTest),
unittest.makeSuite(OOBTreePyTest),
unittest.makeSuite(PureOO),
unittest.makeSuite(PureOOPy),
unittest.makeSuite(OOBucketConflictTests),
unittest.makeSuite(OOBucketPyConflictTests),
unittest.makeSuite(OOSetConflictTests),
unittest.makeSuite(OOSetPyConflictTests),
unittest.makeSuite(OOBTreeConflictTests),
unittest.makeSuite(OOBTreePyConflictTests),
unittest.makeSuite(OOTreeSetConflictTests),
unittest.makeSuite(OOTreeSetPyConflictTests),
unittest.makeSuite(OOModuleTest),
))
...@@ -3061,26 +3061,3 @@ class _Mapping(dict): ...@@ -3061,26 +3061,3 @@ class _Mapping(dict):
return repr(dict(zip(self._keys, self._values))) return repr(dict(zip(self._keys, self._values)))
_Mapping._set_type = _Set _Mapping._set_type = _Set
_Mapping._mapping_type = _Mapping _Mapping._mapping_type = _Mapping
def test_suite():
return unittest.TestSuite((
unittest.makeSuite(Test_Base),
unittest.makeSuite(Test_BucketBase),
unittest.makeSuite(Test_SetIteration),
unittest.makeSuite(BucketTests),
unittest.makeSuite(SetTests),
unittest.makeSuite(Test_TreeItem),
unittest.makeSuite(Test_Tree),
unittest.makeSuite(Test_TreeItems),
unittest.makeSuite(TreeTests),
unittest.makeSuite(TreeSetTests),
unittest.makeSuite(Test_set_operation),
unittest.makeSuite(Test_difference),
unittest.makeSuite(Test_union),
unittest.makeSuite(Test_intersection),
unittest.makeSuite(Test_weightedUnion),
unittest.makeSuite(Test_weightedIntersection),
unittest.makeSuite(Test_multiunion),
unittest.makeSuite(Test_helpers),
))
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
# FOR A PARTICULAR PURPOSE. # FOR A PARTICULAR PURPOSE.
# #
############################################################################## ##############################################################################
import unittest
from BTrees.OOBTree import OOBTree, OOBucket from BTrees.OOBTree import OOBTree, OOBucket
class B(OOBucket): class B(OOBucket):
...@@ -24,7 +26,6 @@ class T(OOBTree): ...@@ -24,7 +26,6 @@ class T(OOBTree):
class S(T): class S(T):
pass pass
import unittest
class SubclassTest(unittest.TestCase): class SubclassTest(unittest.TestCase):
...@@ -49,6 +50,3 @@ class SubclassTest(unittest.TestCase): ...@@ -49,6 +50,3 @@ class SubclassTest(unittest.TestCase):
sub = sub[0] sub = sub[0]
self.assertEqual(sub.__class__, B) self.assertEqual(sub.__class__, B)
self.assertEqual(len(sub), 1) self.assertEqual(len(sub), 1)
def test_suite():
return unittest.makeSuite(SubclassTest)
...@@ -411,15 +411,3 @@ def _makeTree(fill): ...@@ -411,15 +411,3 @@ def _makeTree(fill):
for i in range(_BUCKET_SIZE + 1): for i in range(_BUCKET_SIZE + 1):
tree[i] = 2*i tree[i] = 2*i
return tree return tree
def test_suite():
return unittest.TestSuite((
unittest.makeSuite(Test_classify),
unittest.makeSuite(Test_crack_btree),
unittest.makeSuite(Test_crack_bucket),
unittest.makeSuite(Test_type_and_adr),
unittest.makeSuite(WalkerTests),
unittest.makeSuite(CheckerTests),
unittest.makeSuite(Test_check),
))
...@@ -14,7 +14,11 @@ ...@@ -14,7 +14,11 @@
import unittest import unittest
class fsBucketBase(object): class fsBucketTests(unittest.TestCase):
def _getTargetClass(self):
from BTrees.fsBTree import fsBucket
return fsBucket
def _makeOne(self, *args, **kw): def _makeOne(self, *args, **kw):
return self._getTargetClass()(*args, **kw) return self._getTargetClass()(*args, **kw)
...@@ -43,22 +47,9 @@ class fsBucketBase(object): ...@@ -43,22 +47,9 @@ class fsBucketBase(object):
self.assertRaises(ValueError, bucket.fromString, b'xxx') self.assertRaises(ValueError, bucket.fromString, b'xxx')
class fsBucketTests(unittest.TestCase, fsBucketBase):
def _getTargetClass(self): class fsBucketPyTests(fsBucketTests):
from BTrees.fsBTree import fsBucket
return fsBucket
class fsBucketPyTests(unittest.TestCase, fsBucketBase):
def _getTargetClass(self): def _getTargetClass(self):
from BTrees.fsBTree import fsBucketPy from BTrees.fsBTree import fsBucketPy
return fsBucketPy return fsBucketPy
def test_suite():
return unittest.TestSuite((
unittest.makeSuite(fsBucketTests),
unittest.makeSuite(fsBucketPyTests),
))
...@@ -74,10 +74,3 @@ class Test_oid_repr(unittest.TestCase): ...@@ -74,10 +74,3 @@ class Test_oid_repr(unittest.TestCase):
def test_w_odd_length(self): def test_w_odd_length(self):
self.assertEqual(self._callFUT(b'\0\0\0\0\0\0\x0D\xEF'), b'0x0def') self.assertEqual(self._callFUT(b'\0\0\0\0\0\0\x0D\xEF'), b'0x0def')
def test_suite():
return unittest.TestSuite((
unittest.makeSuite(Test_non_negative),
unittest.makeSuite(Test_oid_repr),
))
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