[Zope-Checkins] CVS: Zope/lib/python/Products/PluginIndexes/PathIndex/tests - testPathIndex.py:1.7.6.3

seb seb@jamkit.com
Thu, 28 Nov 2002 07:15:46 -0500


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

Modified Files:
      Tag: Zope-2_6-branch
	testPathIndex.py 
Log Message:
 - Collector #703: KeyErrors raised when unindexing a PathIndex should
   be swallowed and logged.


=== Zope/lib/python/Products/PluginIndexes/PathIndex/tests/testPathIndex.py 1.7.6.2 => 1.7.6.3 ===
--- Zope/lib/python/Products/PluginIndexes/PathIndex/tests/testPathIndex.py:1.7.6.2	Thu Oct  3 09:45:20 2002
+++ Zope/lib/python/Products/PluginIndexes/PathIndex/tests/testPathIndex.py	Thu Nov 28 07:15:16 2002
@@ -78,6 +78,15 @@
         assert len(self._index._index)==0
         assert len(self._index._unindex)==0
 
+    def testUnIndexError(self):
+        self._populateIndex()
+        
+        # this should not raise an error
+        self._index.unindex_object(-1)
+
+        # nor should this
+        self._index._unindex[1] = "/broken/thing"
+        self._index.unindex_object(1)
 
     def testRoot(self):