Commit 6d20f049 authored by Tres Seaver's avatar Tres Seaver

Merge branch 'expose_tree_iterator'

parents 09fea274 d00b5907
...@@ -753,38 +753,38 @@ BTreeIter_getiter(PyObject *it) ...@@ -753,38 +753,38 @@ BTreeIter_getiter(PyObject *it)
static PyTypeObject BTreeIter_Type = { static PyTypeObject BTreeIter_Type = {
PyVarObject_HEAD_INIT(NULL, 0) PyVarObject_HEAD_INIT(NULL, 0)
MOD_NAME_PREFIX "-iterator", /* tp_name */ MODULE_NAME MOD_NAME_PREFIX "TreeIterator", /* tp_name */
sizeof(BTreeIter), /* tp_basicsize */ sizeof(BTreeIter), /* tp_basicsize */
0, /* tp_itemsize */ 0, /* tp_itemsize */
/* methods */ /* methods */
(destructor)BTreeIter_dealloc, /* tp_dealloc */ (destructor)BTreeIter_dealloc, /* tp_dealloc */
0, /* tp_print */ 0, /* tp_print */
0, /* tp_getattr */ 0, /* tp_getattr */
0, /* tp_setattr */ 0, /* tp_setattr */
0, /* tp_compare */ 0, /* tp_compare */
0, /* tp_repr */ 0, /* tp_repr */
0, /* tp_as_number */ 0, /* tp_as_number */
0, /* tp_as_sequence */ 0, /* tp_as_sequence */
0, /* tp_as_mapping */ 0, /* tp_as_mapping */
0, /* tp_hash */ 0, /* tp_hash */
0, /* tp_call */ 0, /* tp_call */
0, /* tp_str */ 0, /* tp_str */
0, /*PyObject_GenericGetAttr,*/ /* tp_getattro */ 0, /*PyObject_GenericGetAttr,*/ /* tp_getattro */
0, /* tp_setattro */ 0, /* tp_setattro */
0, /* tp_as_buffer */ 0, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT, /* tp_flags */ Py_TPFLAGS_DEFAULT, /* tp_flags */
0, /* tp_doc */ 0, /* tp_doc */
0, /* tp_traverse */ 0, /* tp_traverse */
0, /* tp_clear */ 0, /* tp_clear */
0, /* tp_richcompare */ 0, /* tp_richcompare */
0, /* tp_weaklistoffset */ 0, /* tp_weaklistoffset */
(getiterfunc)BTreeIter_getiter, /* tp_iter */ (getiterfunc)BTreeIter_getiter, /* tp_iter */
(iternextfunc)BTreeIter_next, /* tp_iternext */ (iternextfunc)BTreeIter_next, /* tp_iternext */
0, /* tp_methods */ 0, /* tp_methods */
0, /* tp_members */ 0, /* tp_members */
0, /* tp_getset */ 0, /* tp_getset */
0, /* tp_base */ 0, /* tp_base */
0, /* tp_dict */ 0, /* tp_dict */
0, /* tp_descr_get */ 0, /* tp_descr_get */
0, /* tp_descr_set */ 0, /* tp_descr_set */
}; };
...@@ -28,6 +28,7 @@ from ._base import MERGE_DEFAULT_float ...@@ -28,6 +28,7 @@ from ._base import MERGE_DEFAULT_float
from ._base import Set from ._base import Set
from ._base import Tree as BTree from ._base import Tree as BTree
from ._base import TreeSet from ._base import TreeSet
from ._base import _TreeIterator
from ._base import difference as _difference from ._base import difference as _difference
from ._base import intersection as _intersection from ._base import intersection as _intersection
from ._base import multiunion as _multiunion from ._base import multiunion as _multiunion
...@@ -76,6 +77,10 @@ class IFTreeSetPy(TreeSet): ...@@ -76,6 +77,10 @@ class IFTreeSetPy(TreeSet):
MERGE_DEFAULT = MERGE_DEFAULT_float MERGE_DEFAULT = MERGE_DEFAULT_float
class IFTreeIteratorPy(_TreeIterator):
pass
# Can't declare forward refs, so fix up afterwards: # Can't declare forward refs, so fix up afterwards:
IFBucketPy._mapping_type = IFBucketPy._bucket_type = IFBucketPy IFBucketPy._mapping_type = IFBucketPy._bucket_type = IFBucketPy
...@@ -105,6 +110,7 @@ except ImportError: #pragma NO COVER w/ C extensions ...@@ -105,6 +110,7 @@ except ImportError: #pragma NO COVER w/ C extensions
IFSet = IFSetPy IFSet = IFSetPy
IFBTree = IFBTreePy IFBTree = IFBTreePy
IFTreeSet = IFTreeSetPy IFTreeSet = IFTreeSetPy
IFTreeIterator = IFTreeIteratorPy
difference = differencePy difference = differencePy
union = unionPy union = unionPy
intersection = intersectionPy intersection = intersectionPy
...@@ -115,6 +121,7 @@ else: #pragma NO COVER w/o C extensions ...@@ -115,6 +121,7 @@ else: #pragma NO COVER w/o C extensions
from ._IFBTree import IFSet from ._IFBTree import IFSet
from ._IFBTree import IFBTree from ._IFBTree import IFBTree
from ._IFBTree import IFTreeSet from ._IFBTree import IFTreeSet
from ._IFBTree import IFTreeIterator
from ._IFBTree import difference from ._IFBTree import difference
from ._IFBTree import union from ._IFBTree import union
from ._IFBTree import intersection from ._IFBTree import intersection
......
...@@ -28,6 +28,7 @@ from ._base import MERGE_DEFAULT_int ...@@ -28,6 +28,7 @@ from ._base import MERGE_DEFAULT_int
from ._base import Set from ._base import Set
from ._base import Tree as BTree from ._base import Tree as BTree
from ._base import TreeSet from ._base import TreeSet
from ._base import _TreeIterator
from ._base import difference as _difference from ._base import difference as _difference
from ._base import intersection as _intersection from ._base import intersection as _intersection
from ._base import multiunion as _multiunion from ._base import multiunion as _multiunion
...@@ -77,6 +78,10 @@ class IITreeSetPy(TreeSet): ...@@ -77,6 +78,10 @@ class IITreeSetPy(TreeSet):
MERGE_DEFAULT = MERGE_DEFAULT_int MERGE_DEFAULT = MERGE_DEFAULT_int
class IITreeIteratorPy(_TreeIterator):
pass
# Can't declare forward refs, so fix up afterwards: # Can't declare forward refs, so fix up afterwards:
IIBucketPy._mapping_type = IIBucketPy._bucket_type = IIBucketPy IIBucketPy._mapping_type = IIBucketPy._bucket_type = IIBucketPy
...@@ -106,6 +111,7 @@ except ImportError: #pragma NO COVER w/ C extensions ...@@ -106,6 +111,7 @@ except ImportError: #pragma NO COVER w/ C extensions
IISet = IISetPy IISet = IISetPy
IIBTree = IIBTreePy IIBTree = IIBTreePy
IITreeSet = IITreeSetPy IITreeSet = IITreeSetPy
IITreeIterator = IITreeIteratorPy
difference = differencePy difference = differencePy
union = unionPy union = unionPy
intersection = intersectionPy intersection = intersectionPy
...@@ -116,6 +122,7 @@ else: #pragma NO COVER w/o C extensions ...@@ -116,6 +122,7 @@ else: #pragma NO COVER w/o C extensions
from ._IIBTree import IISet from ._IIBTree import IISet
from ._IIBTree import IIBTree from ._IIBTree import IIBTree
from ._IIBTree import IITreeSet from ._IIBTree import IITreeSet
from ._IIBTree import IITreeIterator
from ._IIBTree import difference from ._IIBTree import difference
from ._IIBTree import union from ._IIBTree import union
from ._IIBTree import intersection from ._IIBTree import intersection
......
...@@ -25,6 +25,7 @@ from ._base import MERGE_WEIGHT_default ...@@ -25,6 +25,7 @@ from ._base import MERGE_WEIGHT_default
from ._base import Set from ._base import Set
from ._base import Tree as BTree from ._base import Tree as BTree
from ._base import TreeSet from ._base import TreeSet
from ._base import _TreeIterator
from ._base import difference as _difference from ._base import difference as _difference
from ._base import intersection as _intersection from ._base import intersection as _intersection
from ._base import multiunion as _multiunion from ._base import multiunion as _multiunion
...@@ -61,6 +62,9 @@ class IOTreeSetPy(TreeSet): ...@@ -61,6 +62,9 @@ class IOTreeSetPy(TreeSet):
MAX_SIZE = _TREE_SIZE MAX_SIZE = _TREE_SIZE
_to_key = _to_key _to_key = _to_key
class IOTreeIteratorPy(_TreeIterator):
pass
# Can't declare forward refs, so fix up afterwards: # Can't declare forward refs, so fix up afterwards:
...@@ -89,6 +93,7 @@ except ImportError: #pragma NO COVER w/ C extensions ...@@ -89,6 +93,7 @@ except ImportError: #pragma NO COVER w/ C extensions
IOSet = IOSetPy IOSet = IOSetPy
IOBTree = IOBTreePy IOBTree = IOBTreePy
IOTreeSet = IOTreeSetPy IOTreeSet = IOTreeSetPy
IOTreeIterator = IOTreeIteratorPy
difference = differencePy difference = differencePy
union = unionPy union = unionPy
intersection = intersectionPy intersection = intersectionPy
...@@ -97,6 +102,7 @@ else: #pragma NO COVER w/o C extensions ...@@ -97,6 +102,7 @@ else: #pragma NO COVER w/o C extensions
from ._IOBTree import IOSet from ._IOBTree import IOSet
from ._IOBTree import IOBTree from ._IOBTree import IOBTree
from ._IOBTree import IOTreeSet from ._IOBTree import IOTreeSet
from ._IOBTree import IOTreeIterator
from ._IOBTree import difference from ._IOBTree import difference
from ._IOBTree import union from ._IOBTree import union
from ._IOBTree import intersection from ._IOBTree import intersection
......
...@@ -28,6 +28,7 @@ from ._base import MERGE_DEFAULT_float ...@@ -28,6 +28,7 @@ from ._base import MERGE_DEFAULT_float
from ._base import Set from ._base import Set
from ._base import Tree as BTree from ._base import Tree as BTree
from ._base import TreeSet from ._base import TreeSet
from ._base import _TreeIterator
from ._base import difference as _difference from ._base import difference as _difference
from ._base import intersection as _intersection from ._base import intersection as _intersection
from ._base import multiunion as _multiunion from ._base import multiunion as _multiunion
...@@ -77,6 +78,10 @@ class LFTreeSetPy(TreeSet): ...@@ -77,6 +78,10 @@ class LFTreeSetPy(TreeSet):
MERGE_DEFAULT = MERGE_DEFAULT_float MERGE_DEFAULT = MERGE_DEFAULT_float
class LFTreeIteratorPy(_TreeIterator):
pass
# Can't declare forward refs, so fix up afterwards: # Can't declare forward refs, so fix up afterwards:
LFBucketPy._mapping_type = LFBucketPy._bucket_type = LFBucketPy LFBucketPy._mapping_type = LFBucketPy._bucket_type = LFBucketPy
...@@ -106,6 +111,7 @@ except ImportError: #pragma NO COVER w/ C extensions ...@@ -106,6 +111,7 @@ except ImportError: #pragma NO COVER w/ C extensions
LFSet = LFSetPy LFSet = LFSetPy
LFBTree = LFBTreePy LFBTree = LFBTreePy
LFTreeSet = LFTreeSetPy LFTreeSet = LFTreeSetPy
LFTreeIterator = LFTreeIteratorPy
difference = differencePy difference = differencePy
union = unionPy union = unionPy
intersection = intersectionPy intersection = intersectionPy
...@@ -116,6 +122,7 @@ else: #pragma NO COVER w/o C extensions ...@@ -116,6 +122,7 @@ else: #pragma NO COVER w/o C extensions
from ._LFBTree import LFSet from ._LFBTree import LFSet
from ._LFBTree import LFBTree from ._LFBTree import LFBTree
from ._LFBTree import LFTreeSet from ._LFBTree import LFTreeSet
from ._LFBTree import LFTreeIterator
from ._LFBTree import difference from ._LFBTree import difference
from ._LFBTree import union from ._LFBTree import union
from ._LFBTree import intersection from ._LFBTree import intersection
......
...@@ -28,6 +28,7 @@ from ._base import MERGE_DEFAULT_int ...@@ -28,6 +28,7 @@ from ._base import MERGE_DEFAULT_int
from ._base import Set from ._base import Set
from ._base import Tree as BTree from ._base import Tree as BTree
from ._base import TreeSet from ._base import TreeSet
from ._base import _TreeIterator
from ._base import difference as _difference from ._base import difference as _difference
from ._base import intersection as _intersection from ._base import intersection as _intersection
from ._base import multiunion as _multiunion from ._base import multiunion as _multiunion
...@@ -77,6 +78,10 @@ class LLTreeSetPy(TreeSet): ...@@ -77,6 +78,10 @@ class LLTreeSetPy(TreeSet):
MERGE_DEFAULT = MERGE_DEFAULT_int MERGE_DEFAULT = MERGE_DEFAULT_int
class LLTreeIteratorPy(_TreeIterator):
pass
# Can't declare forward refs, so fix up afterwards: # Can't declare forward refs, so fix up afterwards:
LLBucketPy._mapping_type = LLBucketPy._bucket_type = LLBucketPy LLBucketPy._mapping_type = LLBucketPy._bucket_type = LLBucketPy
...@@ -106,6 +111,7 @@ except ImportError: #pragma NO COVER w/ C extensions ...@@ -106,6 +111,7 @@ except ImportError: #pragma NO COVER w/ C extensions
LLSet = LLSetPy LLSet = LLSetPy
LLBTree = LLBTreePy LLBTree = LLBTreePy
LLTreeSet = LLTreeSetPy LLTreeSet = LLTreeSetPy
LLTreeIterator = LLTreeIteratorPy
difference = differencePy difference = differencePy
union = unionPy union = unionPy
intersection = intersectionPy intersection = intersectionPy
...@@ -116,6 +122,7 @@ else: #pragma NO COVER w/o C extensions ...@@ -116,6 +122,7 @@ else: #pragma NO COVER w/o C extensions
from ._LLBTree import LLSet from ._LLBTree import LLSet
from ._LLBTree import LLBTree from ._LLBTree import LLBTree
from ._LLBTree import LLTreeSet from ._LLBTree import LLTreeSet
from ._LLBTree import LLTreeIterator
from ._LLBTree import difference from ._LLBTree import difference
from ._LLBTree import union from ._LLBTree import union
from ._LLBTree import intersection from ._LLBTree import intersection
......
...@@ -25,6 +25,7 @@ from ._base import MERGE_WEIGHT_default ...@@ -25,6 +25,7 @@ from ._base import MERGE_WEIGHT_default
from ._base import Set from ._base import Set
from ._base import Tree as BTree from ._base import Tree as BTree
from ._base import TreeSet from ._base import TreeSet
from ._base import _TreeIterator
from ._base import difference as _difference from ._base import difference as _difference
from ._base import intersection as _intersection from ._base import intersection as _intersection
from ._base import multiunion as _multiunion from ._base import multiunion as _multiunion
...@@ -62,6 +63,10 @@ class LOTreeSetPy(TreeSet): ...@@ -62,6 +63,10 @@ class LOTreeSetPy(TreeSet):
_to_key = _to_key _to_key = _to_key
class LOTreeIteratorPy(_TreeIterator):
pass
# Can't declare forward refs, so fix up afterwards: # Can't declare forward refs, so fix up afterwards:
LOBucketPy._mapping_type = LOBucketPy._bucket_type = LOBucketPy LOBucketPy._mapping_type = LOBucketPy._bucket_type = LOBucketPy
...@@ -89,6 +94,7 @@ except ImportError: #pragma NO COVER w/ C extensions ...@@ -89,6 +94,7 @@ except ImportError: #pragma NO COVER w/ C extensions
LOSet = LOSetPy LOSet = LOSetPy
LOBTree = LOBTreePy LOBTree = LOBTreePy
LOTreeSet = LOTreeSetPy LOTreeSet = LOTreeSetPy
LOTreeIterator = LOTreeIteratorPy
difference = differencePy difference = differencePy
union = unionPy union = unionPy
intersection = intersectionPy intersection = intersectionPy
...@@ -97,6 +103,7 @@ else: #pragma NO COVER w/o C extensions ...@@ -97,6 +103,7 @@ else: #pragma NO COVER w/o C extensions
from ._LOBTree import LOSet from ._LOBTree import LOSet
from ._LOBTree import LOBTree from ._LOBTree import LOBTree
from ._LOBTree import LOTreeSet from ._LOBTree import LOTreeSet
from ._LOBTree import LOTreeIterator
from ._LOBTree import difference from ._LOBTree import difference
from ._LOBTree import union from ._LOBTree import union
from ._LOBTree import intersection from ._LOBTree import intersection
......
...@@ -28,6 +28,7 @@ from ._base import MERGE_DEFAULT_float ...@@ -28,6 +28,7 @@ from ._base import MERGE_DEFAULT_float
from ._base import Set from ._base import Set
from ._base import Tree as BTree from ._base import Tree as BTree
from ._base import TreeSet from ._base import TreeSet
from ._base import _TreeIterator
from ._base import difference as _difference from ._base import difference as _difference
from ._base import intersection as _intersection from ._base import intersection as _intersection
from ._base import set_operation as _set_operation from ._base import set_operation as _set_operation
...@@ -75,6 +76,10 @@ class OITreeSetPy(TreeSet): ...@@ -75,6 +76,10 @@ class OITreeSetPy(TreeSet):
MERGE_DEFAULT = MERGE_DEFAULT_float MERGE_DEFAULT = MERGE_DEFAULT_float
class OITreeIteratorPy(_TreeIterator):
pass
# Can't declare forward refs, so fix up afterwards: # Can't declare forward refs, so fix up afterwards:
OIBucketPy._mapping_type = OIBucketPy._bucket_type = OIBucketPy OIBucketPy._mapping_type = OIBucketPy._bucket_type = OIBucketPy
...@@ -103,6 +108,7 @@ except ImportError: #pragma NO COVER w/ C extensions ...@@ -103,6 +108,7 @@ except ImportError: #pragma NO COVER w/ C extensions
OISet = OISetPy OISet = OISetPy
OIBTree = OIBTreePy OIBTree = OIBTreePy
OITreeSet = OITreeSetPy OITreeSet = OITreeSetPy
OITreeIterator = OITreeIteratorPy
difference = differencePy difference = differencePy
union = unionPy union = unionPy
intersection = intersectionPy intersection = intersectionPy
...@@ -112,6 +118,7 @@ else: #pragma NO COVER w/o C extensions ...@@ -112,6 +118,7 @@ else: #pragma NO COVER w/o C extensions
from ._OIBTree import OISet from ._OIBTree import OISet
from ._OIBTree import OIBTree from ._OIBTree import OIBTree
from ._OIBTree import OITreeSet from ._OIBTree import OITreeSet
from ._OIBTree import OITreeIterator
from ._OIBTree import difference from ._OIBTree import difference
from ._OIBTree import union from ._OIBTree import union
from ._OIBTree import intersection from ._OIBTree import intersection
......
...@@ -28,6 +28,7 @@ from ._base import MERGE_DEFAULT_int ...@@ -28,6 +28,7 @@ from ._base import MERGE_DEFAULT_int
from ._base import Set from ._base import Set
from ._base import Tree as BTree from ._base import Tree as BTree
from ._base import TreeSet from ._base import TreeSet
from ._base import _TreeIterator
from ._base import difference as _difference from ._base import difference as _difference
from ._base import intersection as _intersection from ._base import intersection as _intersection
from ._base import set_operation as _set_operation from ._base import set_operation as _set_operation
...@@ -76,6 +77,10 @@ class OLTreeSetPy(TreeSet): ...@@ -76,6 +77,10 @@ class OLTreeSetPy(TreeSet):
MERGE_DEFAULT = MERGE_DEFAULT_int MERGE_DEFAULT = MERGE_DEFAULT_int
class OLTreeIteratorPy(_TreeIterator):
pass
# Can't declare forward refs, so fix up afterwards: # Can't declare forward refs, so fix up afterwards:
OLBucketPy._mapping_type = OLBucketPy._bucket_type = OLBucketPy OLBucketPy._mapping_type = OLBucketPy._bucket_type = OLBucketPy
...@@ -104,6 +109,7 @@ except ImportError: #pragma NO COVER w/ C extensions ...@@ -104,6 +109,7 @@ except ImportError: #pragma NO COVER w/ C extensions
OLSet = OLSetPy OLSet = OLSetPy
OLBTree = OLBTreePy OLBTree = OLBTreePy
OLTreeSet = OLTreeSetPy OLTreeSet = OLTreeSetPy
OLTreeIterator = OLTreeIteratorPy
difference = differencePy difference = differencePy
union = unionPy union = unionPy
intersection = intersectionPy intersection = intersectionPy
...@@ -113,6 +119,7 @@ else: #pragma NO COVER w/o C extensions ...@@ -113,6 +119,7 @@ else: #pragma NO COVER w/o C extensions
from ._OLBTree import OLSet from ._OLBTree import OLSet
from ._OLBTree import OLBTree from ._OLBTree import OLBTree
from ._OLBTree import OLTreeSet from ._OLBTree import OLTreeSet
from ._OLBTree import OLTreeIterator
from ._OLBTree import difference from ._OLBTree import difference
from ._OLBTree import union from ._OLBTree import union
from ._OLBTree import intersection from ._OLBTree import intersection
......
...@@ -24,6 +24,7 @@ from ._base import Bucket ...@@ -24,6 +24,7 @@ from ._base import Bucket
from ._base import Set from ._base import Set
from ._base import Tree as BTree from ._base import Tree as BTree
from ._base import TreeSet from ._base import TreeSet
from ._base import _TreeIterator
from ._base import difference as _difference from ._base import difference as _difference
from ._base import intersection as _intersection from ._base import intersection as _intersection
from ._base import set_operation as _set_operation from ._base import set_operation as _set_operation
...@@ -58,6 +59,10 @@ class OOTreeSetPy(TreeSet): ...@@ -58,6 +59,10 @@ class OOTreeSetPy(TreeSet):
_to_key = _to_key _to_key = _to_key
class OOTreeIteratorPy(_TreeIterator):
pass
# Can't declare forward refs, so fix up afterwards: # Can't declare forward refs, so fix up afterwards:
OOBucketPy._mapping_type = OOBucketPy._bucket_type = OOBucketPy OOBucketPy._mapping_type = OOBucketPy._bucket_type = OOBucketPy
...@@ -84,6 +89,7 @@ except ImportError as e: #pragma NO COVER w/ C extensions ...@@ -84,6 +89,7 @@ except ImportError as e: #pragma NO COVER w/ C extensions
OOSet = OOSetPy OOSet = OOSetPy
OOBTree = OOBTreePy OOBTree = OOBTreePy
OOTreeSet = OOTreeSetPy OOTreeSet = OOTreeSetPy
OOTreeIterator = OOTreeIteratorPy
difference = differencePy difference = differencePy
union = unionPy union = unionPy
intersection = intersectionPy intersection = intersectionPy
...@@ -91,6 +97,7 @@ else: #pragma NO COVER w/o C extensions ...@@ -91,6 +97,7 @@ else: #pragma NO COVER w/o C extensions
from ._OOBTree import OOSet from ._OOBTree import OOSet
from ._OOBTree import OOBTree from ._OOBTree import OOBTree
from ._OOBTree import OOTreeSet from ._OOBTree import OOTreeSet
from ._OOBTree import OOTreeIterator
from ._OOBTree import difference from ._OOBTree import difference
from ._OOBTree import union from ._OOBTree import union
from ._OOBTree import intersection from ._OOBTree import intersection
......
...@@ -1126,6 +1126,18 @@ class _TreeItems(object): ...@@ -1126,6 +1126,18 @@ class _TreeItems(object):
done = 1 done = 1
class _TreeIterator(object):
""" Faux implementation for BBB only.
"""
def __init__(self, items): #pragma NO COVOER
raise TypeError(
"TreeIterators are private implementation details "
"of the C-based BTrees.\n\n"
"Please use 'iter(tree)', rather than instantiating "
"one directly."
)
class Tree(_Tree): class Tree(_Tree):
__slots__ = () __slots__ = ()
......
...@@ -1357,11 +1357,16 @@ class ModuleTest(object): ...@@ -1357,11 +1357,16 @@ class ModuleTest(object):
def _getModule(self): def _getModule(self):
pass pass
def testNames(self): def testNames(self):
for name in ('Bucket', 'BTree', 'Set', 'TreeSet'): names = ['Bucket', 'BTree', 'Set', 'TreeSet']
for name in names:
klass = getattr(self._getModule(), name) klass = getattr(self._getModule(), name)
self.assertEqual(klass.__module__, self._getModule().__name__) self.assertEqual(klass.__module__, self._getModule().__name__)
self.assertTrue(klass is getattr(self._getModule(), self.assertTrue(klass is getattr(self._getModule(),
self.prefix + name)) self.prefix + name))
# BBB for zope.app.security ZCML :(
pfx_iter = self.prefix + 'TreeIterator'
klass = getattr(self._getModule(), pfx_iter)
self.assertEqual(klass.__module__, self._getModule().__name__)
def testModuleProvides(self): def testModuleProvides(self):
from zope.interface.verify import verifyObject from zope.interface.verify import verifyObject
......
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