Commit 4fe5e70c authored by Tim Peters's avatar Tim Peters

Added more little OOV query tests.

parent f4e63c3e
......@@ -103,9 +103,30 @@ class ZCIndexTestsBase:
self.assertEqual(num, 1)
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)
# self.assertEqual(r[0][0], 1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment