[Zope-CVS] CVS: Products/ZCTextIndex/tests - testIndex.py:1.4

Tim Peters tim.one@comcast.net
Thu, 16 May 2002 00:29:04 -0400


Update of /cvs-repository/Products/ZCTextIndex/tests
In directory cvs.zope.org:/tmp/cvs-serv9376/tests

Modified Files:
	testIndex.py 
Log Message:
Both check_docid_known() instance:  assert that the value associated
with the docid is greater than 0 too.


=== Products/ZCTextIndex/tests/testIndex.py 1.3 => 1.4 ===
     def check_docid_known(self, docid):
         self.assert_(self.index._docweight.has_key(docid))
+        self.assert_(self.index._docweight[docid] > 0)
 
     def num_docs_known(self):
         return len(self.index._docweight)
@@ -155,6 +156,7 @@
 
     def check_docid_known(self, docid):
         self.assert_(self.index._doclen.has_key(docid))
+        self.assert_(self.index._doclen[docid] > 0)
 
     def num_docs_known(self):
         return len(self.index._doclen)