[Zope-CVS] CVS: Products/ZCTextIndex/tests - mailtest.py:1.1.2.10
Guido van Rossum
guido@python.org
Wed, 1 May 2002 13:55:43 -0400
Update of /cvs-repository/Products/ZCTextIndex/tests
In directory cvs.zope.org:/tmp/cvs-serv13826
Modified Files:
Tag: TextIndexDS9-branch
mailtest.py
Log Message:
Pass the db object from main() to index() so the db.pack() call will
work.
=== Products/ZCTextIndex/tests/mailtest.py 1.1.2.9 => 1.1.2.10 ===
Message.total_bytes += len(self.text)
-def index(rt, mboxfile):
+def index(rt, mboxfile, db):
global NUM
idx_time = 0
pack_time = 0
@@ -73,6 +73,8 @@
if _msg is None:
break
msg = Message(_msg)
+ if VERBOSE >= 2:
+ print "indexing msg", i
i0 = time.clock()
idx.index_object(i, msg)
docs[i] = msg
@@ -109,7 +111,7 @@
rt = cn.root()
if mbox_path is not None:
- index(rt, mbox_path)
+ index(rt, mbox_path, db)
if query_str is not None:
query(rt, query_str)