[Zope-CVS] CVS: Products/ZCTextIndex/tests - testZCTextIndex.py:1.1.2.8

Guido van Rossum guido@python.org
Fri, 3 May 2002 12:58:08 -0400


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

Modified Files:
      Tag: TextIndexDS9-branch
	testZCTextIndex.py 
Log Message:
Make terms() a method of parse tree nodes.

=== Products/ZCTextIndex/tests/testZCTextIndex.py 1.1.2.7 => 1.1.2.8 ===
-from Products.ZCTextIndex.QueryParser import terms
 from Products.ZCTextIndex.tests \
      import testIndex, testQueryEngine, testQueryParser
 from Products.ZCTextIndex.Index import scaled_int
@@ -98,7 +97,7 @@
         for i in range(len(queries)):
             raw = queries[i]
             q = self.zc_index.parser.parseQuery(raw)
-            wq = self.index.query_weight(terms(q))
+            wq = self.index.query_weight(q.terms())
             eq(wq, scaled_int(wqs[i]))
             r = self.zc_index.query(raw)
             self.assertEqual(len(r), len(results[i]))