Commit 97131918 authored by Guido van Rossum's avatar Guido van Rossum

Use verifyClass().

parent 6f5d92ce
......@@ -14,7 +14,7 @@
from unittest import TestCase, TestSuite, main, makeSuite
##from Interface import verify_class_implementation
from Interface.Verify import verifyClass
from Products.ZCTextIndex.IQueryParser import IQueryParser
from Products.ZCTextIndex.IQueryParseTree import IQueryParseTree
......@@ -29,14 +29,14 @@ from Products.ZCTextIndex.Lexicon import Lexicon, Splitter
class TestInterfaces(TestCase):
def testInterfaces(self):
verify_class_implementation(IQueryParser, QueryParser)
verify_class_implementation(IQueryParseTree, ParseTreeNode)
verify_class_implementation(IQueryParseTree, OrNode)
verify_class_implementation(IQueryParseTree, AndNode)
verify_class_implementation(IQueryParseTree, NotNode)
verify_class_implementation(IQueryParseTree, AtomNode)
verify_class_implementation(IQueryParseTree, PhraseNode)
verify_class_implementation(IQueryParseTree, GlobNode)
verifyClass(IQueryParser, QueryParser)
verifyClass(IQueryParseTree, ParseTreeNode)
verifyClass(IQueryParseTree, OrNode)
verifyClass(IQueryParseTree, AndNode)
verifyClass(IQueryParseTree, NotNode)
verifyClass(IQueryParseTree, AtomNode)
verifyClass(IQueryParseTree, PhraseNode)
verifyClass(IQueryParseTree, GlobNode)
class TestQueryParserBase(TestCase):
......@@ -289,7 +289,7 @@ class FakeStopWordRemover:
def test_suite():
return TestSuite((makeSuite(TestQueryParser),
makeSuite(StopWordTestQueryParser),
## makeSuite(TestInterfaces),
makeSuite(TestInterfaces),
))
......
......@@ -12,7 +12,7 @@
#
##############################################################################
##from Interface import verify_class_implementation
from Interface.Verify import verifyClass
from Products.PluginIndexes.common.PluggableIndex import \
PluggableIndexInterface
......@@ -188,8 +188,8 @@ class CosineIndexTests(ZCIndexTestsBase, testIndex.CosineIndexTest):
# Gigabytes, pp. 180-188. This test peeks into many internals of the
# cosine indexer.
## def testInterface(self):
## verify_class_implementation(PluggableIndexInterface, ZCTextIndex)
def testInterface(self):
verifyClass(PluggableIndexInterface, ZCTextIndex)
def testRanking(self):
self.words = ["cold", "days", "eat", "hot", "lot", "nine", "old",
......
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