[Zope-CVS] CVS: Products/ZCTextIndex/tests - testZCTextIndex.py:1.3

Jeremy Hylton jeremy@zope.com
Tue, 14 May 2002 18:13:28 -0400


Update of /cvs-repository/Products/ZCTextIndex/tests
In directory cvs.zope.org:/tmp/cvs-serv23267/tests

Modified Files:
	testZCTextIndex.py 
Log Message:
Make OkapiIndex the default index.

ZCTextIndex has grown a new argument with a default value that can be
used to specify an Index class to use.  The default is OkapiIndex.Index.

There is a little kludge to make the test succeed.
testZCTestIndex.IndexTests uses the Index.Index tests instead of
OkapiIndex.Index.  Tim will probably fix this.


=== Products/ZCTextIndex/tests/testZCTextIndex.py 1.2 => 1.3 ===
 from Products.ZCTextIndex.tests \
      import testIndex, testQueryEngine, testQueryParser
-from Products.ZCTextIndex.Index import scaled_int, SCALE_FACTOR
+from Products.ZCTextIndex.Index import scaled_int, SCALE_FACTOR, Index
 from Products.ZCTextIndex.Lexicon import Lexicon, Splitter
 from Products.ZCTextIndex.Lexicon import CaseNormalizer, StopWordRemover
 
@@ -35,7 +35,7 @@
         extra.lexicon_id = 'lexicon'
         caller = LexiconHolder(Lexicon(Splitter(), CaseNormalizer(),
                                StopWordRemover()))
-        self.zc_index = ZCTextIndex('name', extra, caller)
+        self.zc_index = ZCTextIndex('name', extra, caller, Index)
         self.index = self.zc_index.index
         self.lexicon = self.zc_index.lexicon