[Zope-CVS] CVS: Products/ZCTextIndex/tests - testZCTextIndex.py:1.22
Tim Peters
tim.one@comcast.net
Fri, 17 May 2002 16:56:00 -0400
Update of /cvs-repository/Products/ZCTextIndex/tests
In directory cvs.zope.org:/tmp/cvs-serv15597/tests
Modified Files:
testZCTextIndex.py
Log Message:
Added more little OOV query tests.
=== Products/ZCTextIndex/tests/testZCTextIndex.py 1.21 => 1.22 ===
self.assertEqual(r[0][0], 1)
+ r, num = self.zc_index.query('to AND question AND be')
+ self.assertEqual(num, 1)
+ self.assertEqual(r[0][0], 1)
+
r, num = self.zc_index.query('to AND NOT question')
self.assertEqual(num, 0)
+
+ r, num = self.zc_index.query('to AND NOT gardenia')
+ self.assertEqual(num, 0)
+
+ r, num = self.zc_index.query('question AND NOT gardenia')
+ self.assertEqual(num, 1)
+ self.assertEqual(r[0][0], 1)
+
+ r, num = self.zc_index.query('question AND gardenia')
+ self.assertEqual(num, 0)
+
+ r, num = self.zc_index.query('gardenia')
+ self.assertEqual(num, 0)
+
+ r, num = self.zc_index.query('question OR gardenia')
+ self.assertEqual(num, 1)
+ self.assertEqual(r[0][0], 1)
# r, num = self.zc_index.query('question AND NOT to AND NOT be')
# self.assertEqual(num, 1)