[Zope3-checkins] CVS: Zope3/lib/python/Zope/TextIndex/tests - testIndex.py:1.3

Guido van Rossum guido@python.org
Wed, 4 Dec 2002 14:02:35 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/TextIndex/tests
In directory cvs.zope.org:/tmp/cvs-serv6301/tests

Modified Files:
	testIndex.py 
Log Message:
Fix embarrassing typo in documentCount().  Add unit tests.

=== Zope3/lib/python/Zope/TextIndex/tests/testIndex.py 1.2 => 1.3 ===
--- Zope3/lib/python/Zope/TextIndex/tests/testIndex.py:1.2	Wed Dec  4 13:41:56 2002
+++ Zope3/lib/python/Zope/TextIndex/tests/testIndex.py	Wed Dec  4 14:02:34 2002
@@ -31,6 +31,9 @@
         doc = "simple document contains five words"
         self.assert_(not self.index.has_doc(DOCID))
         self.index.index_doc(DOCID, doc)
+        self.assertEqual(self.index.documentCount(), 1)
+        self.assertEqual(self.index.wordCount(), 5)
+        self.assertEqual(self.lexicon.wordCount(), 5)
         self.assert_(self.index.has_doc(DOCID))
         self.assert_(self.index._docweight[DOCID])
         self.assertEqual(len(self.index._docweight), 1)