Commit 67d999ac authored by Tim Peters's avatar Tim Peters

Both check_docid_known() instance: assert that the value associated

with the docid is greater than 0 too.
parent 9a224ab9
......@@ -146,6 +146,7 @@ class CosineIndexTest(IndexTest):
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 @@ class OkapiIndexTest(IndexTest):
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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment