Skip to content
This repository has been archived by the owner on May 13, 2020. It is now read-only.

Commit

Permalink
Use verifyClass().
Browse files Browse the repository at this point in the history
  • Loading branch information
gvanrossum committed Jun 10, 2002
1 parent 142ee65 commit 0bf1237
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
20 changes: 10 additions & 10 deletions tests/testQueryParser.py
Expand Up @@ -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
Expand All @@ -29,14 +29,14 @@
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):
Expand Down Expand Up @@ -289,7 +289,7 @@ def process(self, list):
def test_suite():
return TestSuite((makeSuite(TestQueryParser),
makeSuite(StopWordTestQueryParser),
## makeSuite(TestInterfaces),
makeSuite(TestInterfaces),
))


Expand Down
6 changes: 3 additions & 3 deletions tests/testZCTextIndex.py
Expand Up @@ -12,7 +12,7 @@
#
##############################################################################

##from Interface import verify_class_implementation
from Interface.Verify import verifyClass

from Products.PluginIndexes.common.PluggableIndex import \
PluggableIndexInterface
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 0bf1237

Please sign in to comment.