[Zope-CVS] CVS: Products/ZCTextIndex/tests - mailtest.py:1.1.2.2
Jeremy Hylton
jeremy@zope.com
Tue, 30 Apr 2002 20:29:04 -0400
Update of /cvs-repository/Products/ZCTextIndex/tests
In directory cvs.zope.org:/tmp/cvs-serv21014/tests
Modified Files:
Tag: TextIndexDS9-branch
mailtest.py
Log Message:
Use ZCTextIndex instead of TextIndex.
The query() method on ZCTextIndex actually works at this point.
=== Products/ZCTextIndex/tests/mailtest.py 1.1.2.1 => 1.1.2.2 ===
import ZODB.FileStorage
-from Products.PluginIndexes.TextIndex.TextIndex import TextIndex
+from Products.ZCTextIndex.ZCTextIndex import ZCTextIndex
import mailbox
import time
@@ -26,7 +26,7 @@
db = ZODB.DB(f)
cn = db.open()
rt = cn.root()
- rt["index"] = idx = TextIndex("text")
+ rt["index"] = idx = ZCTextIndex("text")
get_transaction().commit()
mbox = mailbox.UnixMailbox(open(inp))
@@ -51,6 +51,7 @@
p1 = time.clock()
print "pack took %s sec" % (p1 - p0)
pack_time += p1 - p0
+
return idx_time, pack_time
if __name__ == "__main__":