Commit adbd86c9 authored by 's avatar

partially reverted r30994 to avoid infinite import loops

parent ae607650
......@@ -172,9 +172,9 @@ class DI_Tests(unittest.TestCase):
from zope.interface.verify import verifyClass
verifyClass(IDateIndex, DateIndex)
verifyClass(IPluggableIndex, DateIndex)
verifyClass(ISortIndex, DateIndex)
verifyClass(IUniqueValueIndex, DateIndex)
verifyClass(IPluggableIndex, DateIndex, 1)
verifyClass(ISortIndex, DateIndex, 1)
verifyClass(IUniqueValueIndex, DateIndex, 1)
def test_empty(self):
empty = self._index
......
......@@ -88,9 +88,9 @@ class DRI_Tests( unittest.TestCase ):
from zope.interface.verify import verifyClass
verifyClass(IDateRangeIndex, DateRangeIndex)
verifyClass(IPluggableIndex, DateRangeIndex)
verifyClass(ISortIndex, DateRangeIndex)
verifyClass(IUniqueValueIndex, DateRangeIndex)
verifyClass(IPluggableIndex, DateRangeIndex, 1)
verifyClass(ISortIndex, DateRangeIndex, 1)
verifyClass(IUniqueValueIndex, DateRangeIndex, 1)
def test_empty( self ):
......
......@@ -100,9 +100,9 @@ class FieldIndexTests(unittest.TestCase):
from Products.PluginIndexes.interfaces import IUniqueValueIndex
from zope.interface.verify import verifyClass
verifyClass(IPluggableIndex, FieldIndex)
verifyClass(ISortIndex, FieldIndex)
verifyClass(IUniqueValueIndex, FieldIndex)
verifyClass(IPluggableIndex, FieldIndex, 1)
verifyClass(ISortIndex, FieldIndex, 1)
verifyClass(IUniqueValueIndex, FieldIndex, 1)
def testEmpty( self ):
"Test an empty FieldIndex."
......
......@@ -120,9 +120,9 @@ class TestKeywordIndex( unittest.TestCase ):
from Products.PluginIndexes.interfaces import IUniqueValueIndex
from zope.interface.verify import verifyClass
verifyClass(IPluggableIndex, KeywordIndex)
verifyClass(ISortIndex, KeywordIndex)
verifyClass(IUniqueValueIndex, KeywordIndex)
verifyClass(IPluggableIndex, KeywordIndex, 1)
verifyClass(ISortIndex, KeywordIndex, 1)
verifyClass(IUniqueValueIndex, KeywordIndex, 1)
def testAddObjectWOKeywords(self):
......
......@@ -30,7 +30,6 @@ from Products.PluginIndexes import PluggableIndex
from Products.PluginIndexes.common import safe_callable
from Products.PluginIndexes.common.util import parseIndexRequest
from Products.PluginIndexes.interfaces import IPathIndex
from Products.PluginIndexes.interfaces import IUniqueValueIndex
_marker = []
LOG = getLogger('Zope.PathIndex')
......@@ -53,7 +52,7 @@ class PathIndex(Persistent, SimpleItem):
"""
__implements__ = (PluggableIndex.UniqueValueIndex,)
implements(IPathIndex, IUniqueValueIndex)
implements(IPathIndex)
meta_type="PathIndex"
......
......@@ -75,7 +75,7 @@ class PathIndexTests(unittest.TestCase):
from zope.interface.verify import verifyClass
verifyClass(IPathIndex, PathIndex)
verifyClass(IUniqueValueIndex, PathIndex)
verifyClass(IUniqueValueIndex, PathIndex, 1)
def testEmpty(self):
self.assertEqual(self._index.numObjects() ,0)
......
......@@ -34,7 +34,6 @@ from Products.PluginIndexes import PluggableIndex
from Products.PluginIndexes.common import safe_callable
from Products.PluginIndexes.common.ResultList import ResultList
from Products.PluginIndexes.common.util import parseIndexRequest
from Products.PluginIndexes.interfaces import IPluggableIndex
from Products.PluginIndexes.interfaces import ITextIndex
from Lexicon import Lexicon
......@@ -78,7 +77,7 @@ class TextIndex(Persistent, Implicit, SimpleItem):
"""
__implements__ = (PluggableIndex.PluggableIndexInterface,)
implements(ITextIndex, IPluggableIndex)
implements(ITextIndex)
meta_type='TextIndex'
......
......@@ -92,7 +92,7 @@ class Tests(unittest.TestCase):
from Products.PluginIndexes.TextIndex.TextIndex import TextIndex
from zope.interface.verify import verifyClass
verifyClass(IPluggableIndex, TextIndex)
verifyClass(IPluggableIndex, TextIndex, 1)
verifyClass(ITextIndex, TextIndex)
def test_SimpleAddDelete(self):
......
......@@ -25,7 +25,6 @@ from zope.interface import implements
from Products.PluginIndexes import PluggableIndex
from Products.PluginIndexes.common.util import parseIndexRequest
from Products.PluginIndexes.interfaces import IPluggableIndex
from Products.PluginIndexes.interfaces import ITopicIndex
import FilteredSet
......@@ -43,7 +42,7 @@ class TopicIndex(Persistent, SimpleItem):
"""
__implements__ = (PluggableIndex.PluggableIndexInterface,)
implements(ITopicIndex, IPluggableIndex)
implements(ITopicIndex)
meta_type="TopicIndex"
query_options = ('query','operator')
......
......@@ -71,7 +71,7 @@ class TestTopicIndex(TestBase):
from zope.interface.verify import verifyClass
verifyClass(ITopicIndex, TopicIndex)
verifyClass(IPluggableIndex, TopicIndex)
verifyClass(IPluggableIndex, TopicIndex, 1)
def testOr(self):
self._searchOr('doc1',[1,2])
......
......@@ -24,14 +24,10 @@ from BTrees.IOBTree import IOBTree
import BTrees.Length
from BTrees.OOBTree import OOBTree
from OFS.SimpleItem import SimpleItem
from zope.interface import implements
from Products.PluginIndexes import PluggableIndex
from Products.PluginIndexes.common import safe_callable
from Products.PluginIndexes.common.util import parseIndexRequest
from Products.PluginIndexes.interfaces import IPluggableIndex
from Products.PluginIndexes.interfaces import ISortIndex
from Products.PluginIndexes.interfaces import IUniqueValueIndex
_marker = []
LOG = getLogger('Zope.UnIndex')
......@@ -44,7 +40,6 @@ class UnIndex(SimpleItem):
__implements__ = (PluggableIndex.UniqueValueIndex,
PluggableIndex.SortIndex)
implements(IPluggableIndex, IUniqueValueIndex, ISortIndex)
def __init__(
self, id, ignore_ex=None, call_methods=None, extra=None, caller=None):
......
......@@ -31,7 +31,6 @@ from Products.PluginIndexes.common.PluggableIndex import \
PluggableIndexInterface
from Products.PluginIndexes.common.util import parseIndexRequest
from Products.PluginIndexes.common import safe_callable
from Products.PluginIndexes.interfaces import IPluggableIndex
from Products.ZCTextIndex.ILexicon import ILexicon
from Products.ZCTextIndex.Lexicon import \
......@@ -55,7 +54,7 @@ class ZCTextIndex(Persistent, Acquisition.Implicit, SimpleItem):
"""
__implements__ = PluggableIndexInterface
implements(IZCTextIndex, IPluggableIndex)
implements(IZCTextIndex)
## Magic class attributes ##
......
......@@ -267,7 +267,7 @@ class CosineIndexTests(ZCIndexTestsBase, testIndex.CosineIndexTest):
from Products.ZCTextIndex.interfaces import IZCTextIndex
from zope.interface.verify import verifyClass
verifyClass(IPluggableIndex, ZCTextIndex)
verifyClass(IPluggableIndex, ZCTextIndex, 1)
verifyClass(IZCTextIndex, ZCTextIndex)
def testRanking(self):
......
......@@ -37,10 +37,8 @@ from Products.PluginIndexes.common.PluggableIndex \
import PluggableIndexInterface
from Products.PluginIndexes.TextIndex import Splitter
from zLOG import LOG
from zope.interface import implements
from Catalog import Catalog, CatalogError
from interfaces import IZCatalog as z3IZCatalog
from IZCatalog import IZCatalog as z2IZCatalog
from ProgressHandler import ZLogHandler
from ZCatalogIndexes import ZCatalogIndexes
......@@ -83,7 +81,6 @@ class ZCatalog(Folder, Persistent, Implicit):
"""
__implements__ = z2IZCatalog
implements(z3IZCatalog)
meta_type = "ZCatalog"
icon='misc_/ZCatalog/ZCatalog.gif'
......
......@@ -193,7 +193,7 @@ class TestZCatalog(unittest.TestCase):
from Products.ZCatalog.ZCatalog import ZCatalog
from zope.interface.verify import verifyClass
verifyClass(IZCatalog, ZCatalog)
verifyClass(IZCatalog, ZCatalog, 1)
def testGetMetadataForUID(self):
testNum = str(self.upper - 3) # as good as any..
......
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