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

Andreas Jung andreas at andreas-jung.com
Fri Aug 15 11:46:40 EDT 2003


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

Modified Files:
      Tag: ajung-indexes-btrees-length-branch
	testPathIndex.py 
Log Message:
assert -> self.assertEqual()


=== Zope/lib/python/Products/PluginIndexes/PathIndex/tests/testPathIndex.py 1.10.36.1 => 1.10.36.2 ===
--- Zope/lib/python/Products/PluginIndexes/PathIndex/tests/testPathIndex.py:1.10.36.1	Fri Aug 15 10:35:28 2003
+++ Zope/lib/python/Products/PluginIndexes/PathIndex/tests/testPathIndex.py	Fri Aug 15 10:46:35 2003
@@ -15,7 +15,6 @@
 
 from Products.PluginIndexes.PathIndex.PathIndex import PathIndex
 
-
 class Dummy:
 
     meta_type="foo"
@@ -62,10 +61,10 @@
             self._index.index_object( k, v )
 
     def testEmpty(self):
-        assert len( self._index ) == 0
-        assert self._index.getEntryForObject( 1234 ) is None
+        self.assertEqual(self._index.numObjects() ,0)
+        self.assertEqual(self._index.getEntryForObject(1234), None)
         self._index.unindex_object( 1234 ) # nothrow
-        assert self._index._apply_index( {"suxpath":"xxx"} ) is None
+        self.assertEqual(self._index._apply_index({"suxpath":"xxx"}), None)
 
     def testUnIndex(self):
         self._populateIndex()
@@ -75,8 +74,8 @@
             self._index.unindex_object(k)
 
         self.assertEqual(self._index.numObjects(), 0)
-        assert len(self._index._index)==0
-        assert len(self._index._unindex)==0
+        self.assertEqual(len(self._index._index), 0)
+        self.assertEqual(len(self._index._unindex), 0)
 
     def testReindex(self):
         self._populateIndex()




More information about the Zope-Checkins mailing list