[Checkins] SVN: BTrees/branches/pure_python/ Move LL-related set-op tests into LL test module.
Tres Seaver
cvs-admin at zope.org
Sun Nov 11 18:55:51 UTC 2012
Log message for revision 128224:
Move LL-related set-op tests into LL test module.
Changed:
_U BTrees/branches/pure_python/
U BTrees/branches/pure_python/BTrees/tests/testSetOps.py
U BTrees/branches/pure_python/BTrees/tests/test_LLBTree.py
-=-
Modified: BTrees/branches/pure_python/BTrees/tests/testSetOps.py
===================================================================
--- BTrees/branches/pure_python/BTrees/tests/testSetOps.py 2012-11-11 18:55:49 UTC (rev 128223)
+++ BTrees/branches/pure_python/BTrees/tests/testSetOps.py 2012-11-11 18:55:50 UTC (rev 128224)
@@ -53,23 +53,6 @@
from BTrees.OIBTree import OISet
return OISet, OITreeSet, makeBuilder(OIBTree), makeBuilder(OIBucket)
-class PureLL(SetResult, unittest.TestCase):
- def union(self, *args):
- from BTrees.LLBTree import union
- return union(*args)
- def intersection(self, *args):
- from BTrees.LLBTree import intersection
- return intersection(*args)
- def difference(self, *args):
- from BTrees.LLBTree import difference
- return difference(*args)
- def builders(self):
- from BTrees.LLBTree import LLBTree
- from BTrees.LLBTree import LLBucket
- from BTrees.LLBTree import LLTreeSet
- from BTrees.LLBTree import LLSet
- return LLSet, LLTreeSet, makeBuilder(LLBTree), makeBuilder(LLBucket)
-
class PureLO(SetResult, unittest.TestCase):
def union(self, *args):
from BTrees.LOBTree import union
@@ -121,26 +104,6 @@
from BTrees.OLBTree import OLSet
return OLSet, OLTreeSet, makeBuilder(OLBTree), makeBuilder(OLBucket)
-class TestLLMultiUnion(MultiUnion, unittest.TestCase):
- def multiunion(self, *args):
- from BTrees.LLBTree import multiunion
- return multiunion(*args)
- def union(self, *args):
- from BTrees.LLBTree import union
- return union(*args)
- def mkset(self, *args):
- from BTrees.LLBTree import LLSet as mkset
- return mkset(*args)
- def mktreeset(self, *args):
- from BTrees.LLBTree import LLTreeSet as mktreeset
- return mktreeset(*args)
- def mkbucket(self, *args):
- from BTrees.LLBTree import LLBucket as mkbucket
- return mkbucket(*args)
- def mkbtree(self, *args):
- from BTrees.LLBTree import LLBTree as mkbtree
- return mkbtree(*args)
-
class TestLOMultiUnion(MultiUnion, unittest.TestCase):
def multiunion(self, *args):
from BTrees.LOBTree import multiunion
@@ -291,29 +254,6 @@
from BTrees.OIBTree import OISet
return OIBucket, OIBTree, itemsToSet(OISet), itemsToSet(OITreeSet)
-class TestWeightedLL(Weighted, unittest.TestCase):
- def weightedUnion(self):
- from BTrees.LLBTree import weightedUnion
- return weightedUnion
- def weightedIntersection(self):
- from BTrees.LLBTree import weightedIntersection
- return weightedIntersection
- def union(self):
- from BTrees.LLBTree import union
- return union
- def intersection(self):
- from BTrees.LLBTree import intersection
- return intersection
- def mkbucket(self, *args):
- from BTrees.LLBTree import LLBucket as mkbucket
- return mkbucket(*args)
- def builders(self):
- from BTrees.LLBTree import LLBTree
- from BTrees.LLBTree import LLBucket
- from BTrees.LLBTree import LLTreeSet
- from BTrees.LLBTree import LLSet
- return LLBucket, LLBTree, itemsToSet(LLSet), itemsToSet(LLTreeSet)
-
class TestWeightedOL(Weighted, unittest.TestCase):
def weightedUnion(self):
from BTrees.OLBTree import weightedUnion
@@ -341,10 +281,6 @@
def test_suite():
return unittest.TestSuite((
- unittest.makeSuite(TestLLMultiUnion),
- unittest.makeSuite(PureLL),
- unittest.makeSuite(TestWeightedLL),
-
unittest.makeSuite(TestLOMultiUnion),
unittest.makeSuite(PureLO),
Modified: BTrees/branches/pure_python/BTrees/tests/test_LLBTree.py
===================================================================
--- BTrees/branches/pure_python/BTrees/tests/test_LLBTree.py 2012-11-11 18:55:49 UTC (rev 128223)
+++ BTrees/branches/pure_python/BTrees/tests/test_LLBTree.py 2012-11-11 18:55:50 UTC (rev 128224)
@@ -13,16 +13,21 @@
##############################################################################
import unittest
-from BTrees.tests.common import BTreeTests
-from BTrees.tests.common import ExtendedSetTests
-from BTrees.tests.common import I_SetsBase
-from BTrees.tests.common import InternalKeysMappingTest
-from BTrees.tests.common import InternalKeysSetTest
-from BTrees.tests.common import MappingBase
-from BTrees.tests.common import ModuleTest
-from BTrees.tests.common import NormalSetTests
-from BTrees.tests.common import TestLongIntKeys
-from BTrees.tests.common import TestLongIntValues
+from .common import BTreeTests
+from .common import ExtendedSetTests
+from .common import I_SetsBase
+from .common import InternalKeysMappingTest
+from .common import InternalKeysSetTest
+from .common import MappingBase
+from .common import ModuleTest
+from .common import MultiUnion
+from .common import NormalSetTests
+from .common import SetResult
+from .common import TestLongIntKeys
+from .common import TestLongIntValues
+from .common import Weighted
+from .common import itemsToSet
+from .common import makeBuilder
class LLBTreeInternalKeyTest(InternalKeysMappingTest, unittest.TestCase):
@@ -104,6 +109,69 @@
return LLTreeSet()
+class PureLL(SetResult, unittest.TestCase):
+ def union(self, *args):
+ from BTrees.LLBTree import union
+ return union(*args)
+ def intersection(self, *args):
+ from BTrees.LLBTree import intersection
+ return intersection(*args)
+ def difference(self, *args):
+ from BTrees.LLBTree import difference
+ return difference(*args)
+ def builders(self):
+ from BTrees.LLBTree import LLBTree
+ from BTrees.LLBTree import LLBucket
+ from BTrees.LLBTree import LLTreeSet
+ from BTrees.LLBTree import LLSet
+ return LLSet, LLTreeSet, makeBuilder(LLBTree), makeBuilder(LLBucket)
+
+
+class TestLLMultiUnion(MultiUnion, unittest.TestCase):
+ def multiunion(self, *args):
+ from BTrees.LLBTree import multiunion
+ return multiunion(*args)
+ def union(self, *args):
+ from BTrees.LLBTree import union
+ return union(*args)
+ def mkset(self, *args):
+ from BTrees.LLBTree import LLSet as mkset
+ return mkset(*args)
+ def mktreeset(self, *args):
+ from BTrees.LLBTree import LLTreeSet as mktreeset
+ return mktreeset(*args)
+ def mkbucket(self, *args):
+ from BTrees.LLBTree import LLBucket as mkbucket
+ return mkbucket(*args)
+ def mkbtree(self, *args):
+ from BTrees.LLBTree import LLBTree as mkbtree
+ return mkbtree(*args)
+
+
+class TestWeightedLL(Weighted, unittest.TestCase):
+ def weightedUnion(self):
+ from BTrees.LLBTree import weightedUnion
+ return weightedUnion
+ def weightedIntersection(self):
+ from BTrees.LLBTree import weightedIntersection
+ return weightedIntersection
+ def union(self):
+ from BTrees.LLBTree import union
+ return union
+ def intersection(self):
+ from BTrees.LLBTree import intersection
+ return intersection
+ def mkbucket(self, *args):
+ from BTrees.LLBTree import LLBucket as mkbucket
+ return mkbucket(*args)
+ def builders(self):
+ from BTrees.LLBTree import LLBTree
+ from BTrees.LLBTree import LLBucket
+ from BTrees.LLBTree import LLTreeSet
+ from BTrees.LLBTree import LLSet
+ return LLBucket, LLBTree, itemsToSet(LLSet), itemsToSet(LLTreeSet)
+
+
def test_suite():
return unittest.TestSuite((
unittest.makeSuite(LLBTreeInternalKeyTest),
@@ -115,4 +183,8 @@
unittest.makeSuite(LLBTreeTest),
unittest.makeSuite(TestLLSets),
unittest.makeSuite(TestLLTreeSets),
+
+ unittest.makeSuite(TestLLMultiUnion),
+ unittest.makeSuite(PureLL),
+ unittest.makeSuite(TestWeightedLL),
))
More information about the checkins
mailing list