[Zope-Checkins]
CVS: Zope/lib/python/Products/PluginIndexes/FieldIndex/tests
- testFieldIndex.py:1.8
Casey Duncan
casey at zope.com
Fri Apr 23 11:48:03 EDT 2004
Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/FieldIndex/tests
In directory cvs.zope.org:/tmp/cvs-serv5040/FieldIndex/tests
Modified Files:
testFieldIndex.py
Log Message:
Port performance fix for UnIndex.numObjects()
=== Zope/lib/python/Products/PluginIndexes/FieldIndex/tests/testFieldIndex.py 1.7 => 1.8 ===
--- Zope/lib/python/Products/PluginIndexes/FieldIndex/tests/testFieldIndex.py:1.7 Wed Jan 7 11:44:30 2004
+++ Zope/lib/python/Products/PluginIndexes/FieldIndex/tests/testFieldIndex.py Fri Apr 23 11:47:32 2004
@@ -12,7 +12,6 @@
##############################################################################
import os, sys, unittest
-
import ZODB
from Products.PluginIndexes.FieldIndex.FieldIndex import FieldIndex
@@ -93,6 +92,7 @@
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 )
@@ -116,6 +116,7 @@
assert len( self._index ) == len( values )-1 #'abce' is duplicate
assert len( self._index.referencedObjects() ) == len( values )
+ self.assertEqual(self._index.numObjects(), len( values )-1)
assert self._index.getEntryForObject( 1234 ) is None
assert ( self._index.getEntryForObject( 1234, self._marker )
More information about the Zope-Checkins
mailing list