[Checkins] SVN: BTrees/branches/pure_python/ Move remaining 'testSetOp' tests into appropriate modules.

Tres Seaver cvs-admin at zope.org
Sun Nov 11 19:00:41 UTC 2012


Log message for revision 128229:
  Move remaining 'testSetOp' tests into appropriate modules.

Changed:
  _U  BTrees/branches/pure_python/
  D   BTrees/branches/pure_python/BTrees/tests/testSetOps.py
  U   BTrees/branches/pure_python/BTrees/tests/test_IOBTree.py
  U   BTrees/branches/pure_python/BTrees/tests/test_LOBTree.py
  U   BTrees/branches/pure_python/BTrees/tests/test_OIBTree.py
  U   BTrees/branches/pure_python/BTrees/tests/test_OLBTree.py
  U   BTrees/branches/pure_python/BTrees/tests/test_OOBTree.py

-=-
Deleted: BTrees/branches/pure_python/BTrees/tests/testSetOps.py
===================================================================
--- BTrees/branches/pure_python/BTrees/tests/testSetOps.py	2012-11-11 19:00:39 UTC (rev 128228)
+++ BTrees/branches/pure_python/BTrees/tests/testSetOps.py	2012-11-11 19:00:40 UTC (rev 128229)
@@ -1,114 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2002 Zope Foundation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE
-#
-##############################################################################
-import unittest
-
-from .common import MultiUnion
-from .common import SetResult
-from .common import Weighted
-from .common import itemsToSet
-from .common import makeBuilder
-
-# Check that various special module functions are and aren't imported from
-# the expected BTree modules.
-class TestImports(unittest.TestCase):
-    def testWeightedUnion(self):
-        from BTrees.IIBTree import weightedUnion
-        from BTrees.OIBTree import weightedUnion
-
-        try:
-            from BTrees.IOBTree import weightedUnion
-        except ImportError:
-            pass
-        else:
-            self.fail("IOBTree shouldn't have weightedUnion")
-
-        from BTrees.LLBTree import weightedUnion
-        from BTrees.OLBTree import weightedUnion
-
-        try:
-            from BTrees.LOBTree import weightedUnion
-        except ImportError:
-            pass
-        else:
-            self.fail("LOBTree shouldn't have weightedUnion")
-
-        try:
-            from BTrees.OOBTree import weightedUnion
-        except ImportError:
-            pass
-        else:
-            self.fail("OOBTree shouldn't have weightedUnion")
-
-    def testWeightedIntersection(self):
-        from BTrees.IIBTree import weightedIntersection
-        from BTrees.OIBTree import weightedIntersection
-
-        try:
-            from BTrees.IOBTree import weightedIntersection
-        except ImportError:
-            pass
-        else:
-            self.fail("IOBTree shouldn't have weightedIntersection")
-
-        from BTrees.LLBTree import weightedIntersection
-        from BTrees.OLBTree import weightedIntersection
-
-        try:
-            from BTrees.LOBTree import weightedIntersection
-        except ImportError:
-            pass
-        else:
-            self.fail("LOBTree shouldn't have weightedIntersection")
-
-        try:
-            from BTrees.OOBTree import weightedIntersection
-        except ImportError:
-            pass
-        else:
-            self.fail("OOBTree shouldn't have weightedIntersection")
-
-    def testMultiunion(self):
-        from BTrees.IIBTree import multiunion
-        from BTrees.IOBTree import multiunion
-
-        try:
-            from BTrees.OIBTree import multiunion
-        except ImportError:
-            pass
-        else:
-            self.fail("OIBTree shouldn't have multiunion")
-
-        from BTrees.LLBTree import multiunion
-        from BTrees.LOBTree import multiunion
-
-        try:
-            from BTrees.OLBTree import multiunion
-        except ImportError:
-            pass
-        else:
-            self.fail("OLBTree shouldn't have multiunion")
-
-        try:
-            from BTrees.OOBTree import multiunion
-        except ImportError:
-            pass
-        else:
-            self.fail("OOBTree shouldn't have multiunion")
-
-
-def test_suite():
-    return unittest.TestSuite((
-
-        unittest.makeSuite(TestImports),
-    ))

Modified: BTrees/branches/pure_python/BTrees/tests/test_IOBTree.py
===================================================================
--- BTrees/branches/pure_python/BTrees/tests/test_IOBTree.py	2012-11-11 19:00:39 UTC (rev 128228)
+++ BTrees/branches/pure_python/BTrees/tests/test_IOBTree.py	2012-11-11 19:00:40 UTC (rev 128229)
@@ -76,7 +76,23 @@
         import BTrees.Interfaces
         return BTrees.Interfaces.IIntegerObjectBTreeModule
 
+    def test_weightedUnion_not_present(self):
+        try:
+            from BTrees.IOBTree import weightedUnion
+        except ImportError:
+            pass
+        else:
+            self.fail("IOBTree shouldn't have weightedUnion")
 
+    def test_weightedIntersection_not_present(self):
+        try:
+            from BTrees.IOBTree import weightedIntersection
+        except ImportError:
+            pass
+        else:
+            self.fail("IOBTree shouldn't have weightedIntersection")
+
+
 class IOBTreeTest(BTreeTests, unittest.TestCase):
 
     def _makeOne(self):

Modified: BTrees/branches/pure_python/BTrees/tests/test_LOBTree.py
===================================================================
--- BTrees/branches/pure_python/BTrees/tests/test_LOBTree.py	2012-11-11 19:00:39 UTC (rev 128228)
+++ BTrees/branches/pure_python/BTrees/tests/test_LOBTree.py	2012-11-11 19:00:40 UTC (rev 128229)
@@ -74,8 +74,24 @@
         import BTrees.Interfaces
         return BTrees.Interfaces.IIntegerObjectBTreeModule
 
+    def test_weightedUnion_not_present(self):
+        try:
+            from BTrees.LOBTree import weightedUnion
+        except ImportError:
+            pass
+        else:
+            self.fail("LOBTree shouldn't have weightedUnion")
 
+    def test_weightedIntersection_not_present(self):
+        try:
+            from BTrees.LOBTree import weightedIntersection
+        except ImportError:
+            pass
+        else:
+            self.fail("LOBTree shouldn't have weightedIntersection")
 
+
+
 class LOBTreeTest(BTreeTests, TestLongIntKeys, unittest.TestCase):
 
     def _makeOne(self):

Modified: BTrees/branches/pure_python/BTrees/tests/test_OIBTree.py
===================================================================
--- BTrees/branches/pure_python/BTrees/tests/test_OIBTree.py	2012-11-11 19:00:39 UTC (rev 128228)
+++ BTrees/branches/pure_python/BTrees/tests/test_OIBTree.py	2012-11-11 19:00:40 UTC (rev 128229)
@@ -76,7 +76,15 @@
         import BTrees.Interfaces
         return BTrees.Interfaces.IObjectIntegerBTreeModule
 
+    def test_multiunion_not_present(self):
+        try:
+            from BTrees.OIBTree import multiunion
+        except ImportError:
+            pass
+        else:
+            self.fail("OIBTree shouldn't have multiunion")
 
+
 class OIBTreeTest(BTreeTests, unittest.TestCase):
 
     def _makeOne(self):

Modified: BTrees/branches/pure_python/BTrees/tests/test_OLBTree.py
===================================================================
--- BTrees/branches/pure_python/BTrees/tests/test_OLBTree.py	2012-11-11 19:00:39 UTC (rev 128228)
+++ BTrees/branches/pure_python/BTrees/tests/test_OLBTree.py	2012-11-11 19:00:40 UTC (rev 128229)
@@ -74,7 +74,15 @@
         import BTrees.Interfaces
         return BTrees.Interfaces.IObjectIntegerBTreeModule
 
+    def test_multiunion_not_present(self):
+        try:
+            from BTrees.OLBTree import multiunion
+        except ImportError:
+            pass
+        else:
+            self.fail("OLBTree shouldn't have multiunion")
 
+
 class OLBTreeTest(BTreeTests, TestLongIntValues, unittest.TestCase):
 
     def _makeOne(self):

Modified: BTrees/branches/pure_python/BTrees/tests/test_OOBTree.py
===================================================================
--- BTrees/branches/pure_python/BTrees/tests/test_OOBTree.py	2012-11-11 19:00:39 UTC (rev 128228)
+++ BTrees/branches/pure_python/BTrees/tests/test_OOBTree.py	2012-11-11 19:00:40 UTC (rev 128229)
@@ -158,17 +158,45 @@
         import BTrees.Interfaces
         return BTrees.Interfaces.IObjectObjectBTreeModule
 
+    def test_weightedUnion_not_present(self):
+        try:
+            from BTrees.OOBTree import weightedUnion
+        except ImportError:
+            pass
+        else:
+            self.fail("OOBTree shouldn't have weightedUnion")
 
+    def test_weightedIntersection_not_present(self):
+        try:
+            from BTrees.OOBTree import weightedIntersection
+        except ImportError:
+            pass
+        else:
+            self.fail("OOBTree shouldn't have weightedIntersection")
+
+    def test_multiunion_not_present(self):
+        try:
+            from BTrees.OOBTree import multiunion
+        except ImportError:
+            pass
+        else:
+            self.fail("OOBTree shouldn't have multiunion")
+
+
 class PureOO(SetResult, unittest.TestCase):
+
     def union(self, *args):
         from BTrees.OOBTree import union
         return union(*args)
+
     def intersection(self, *args):
         from BTrees.OOBTree import intersection
         return intersection(*args)
+
     def difference(self, *args):
         from BTrees.OOBTree import difference
         return difference(*args)
+
     def builders(self):
         from BTrees.OOBTree import OOBTree
         from BTrees.OOBTree import OOBucket
@@ -189,10 +217,8 @@
         unittest.makeSuite(OOTreeSetPyTest),
         unittest.makeSuite(OOSetTest),
         unittest.makeSuite(OOSetPyTest),
-        unittest.makeSuite(OOModuleTest),
         unittest.makeSuite(OOBTreeTest),
         unittest.makeSuite(OOBTreePyTest),
         unittest.makeSuite(OOModuleTest),
-
         unittest.makeSuite(PureOO),
     ))



More information about the checkins mailing list