[Zope-Checkins] CVS: Zope/lib/python/Products/PluginIndexes/KeywordIndex/tests - testKeywordIndex.py:1.5.6.2

Casey Duncan casey at zope.com
Fri Apr 23 10:50:56 EDT 2004


Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/KeywordIndex/tests
In directory cvs.zope.org:/tmp/cvs-serv25935/lib/python/Products/PluginIndexes/KeywordIndex/tests

Modified Files:
      Tag: Zope-2_6-branch
	testKeywordIndex.py 
Log Message:
Backport performace fix for index numObjects(), which should cure the slowness of the Indexes tab for large ZCatalogs


=== Zope/lib/python/Products/PluginIndexes/KeywordIndex/tests/testKeywordIndex.py 1.5.6.1 => 1.5.6.2 ===
--- Zope/lib/python/Products/PluginIndexes/KeywordIndex/tests/testKeywordIndex.py:1.5.6.1	Fri Feb 28 10:58:19 2003
+++ Zope/lib/python/Products/PluginIndexes/KeywordIndex/tests/testKeywordIndex.py	Fri Apr 23 10:50:25 2004
@@ -114,6 +114,7 @@
     def testEmpty( self ):
         assert len( self._index ) == 0
         assert len( self._index.referencedObjects() ) == 0
+        self.assertEqual(self._index.numObjects(), 0)
 
         assert self._index.getEntryForObject( 1234 ) is None
         assert ( self._index.getEntryForObject( 1234, self._marker )
@@ -134,7 +135,7 @@
         self._populateIndex()
         values = self._values
 
-        #assert len( self._index ) == len( values )
+        self.assertEqual(self._index.numObjects(), len( values )-1)
         assert len( self._index.referencedObjects() ) == len( values )
 
         assert self._index.getEntryForObject( 1234 ) is None




More information about the Zope-Checkins mailing list