[Zope-Checkins] CVS: Zope/lib/python/Products/PluginIndexes/TextIndexNG/tests - testTextIndexNGinCatalog.py:1.1.2.5
Andreas Jung
andreas@digicool.com
Sun, 24 Feb 2002 14:43:17 -0500
Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/TextIndexNG/tests
In directory cvs.zope.org:/tmp/cvs-serv31987/lib/python/Products/PluginIndexes/TextIndexNG/tests
Modified Files:
Tag: ajung-textindexng-branch
testTextIndexNGinCatalog.py
Log Message:
- NEAR search works now with enabled stemmer support
- minor code cleanup
- added more tests
=== Zope/lib/python/Products/PluginIndexes/TextIndexNG/tests/testTextIndexNGinCatalog.py 1.1.2.4 => 1.1.2.5 ===
verbose = 1
-timed_statistics = 0
+timed_statistics = 1
class TO(ExtensionClass.Base):
@@ -87,11 +87,12 @@
class Tests(CatalogTestBase):
- def checkNearSearchNoStemmer(self):
+ def testNearSearchNoStemmer(self):
self._init(arguments(
splitterCasefolding = 1,
nearDistance = 3,
+ useGlobbing = 0,
useStemmer = None
))
@@ -104,6 +105,25 @@
self.search('FOX quote jumps ', [2] )
self.search('FOX near over', [2] )
self.search('FOX quote over', [] )
+
+
+ def testNearSearchWithStemmer(self):
+
+
+ self._init(arguments(
+ splitterCasefolding = 1,
+ nearDistance = 3,
+ useGlobbing = 0,
+ useStemmer = 'porter'
+ ))
+
+
+ self.search('extension near comparison', [5] )
+ self.search('extensions near comparisons', [5] )
+ self.search('extension near comparisons', [5] )
+ self.search('extensions near comparison', [5] )
+ self.search('extensions near daemons ', [] )
+ self.search('extensions near daemon', [] )
def test_suite():