changeset 4876:75c067fb7d1b

xapian indexing tests: fix api usage, fix comments, add comment about slowness
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Wed, 22 Jul 2009 12:07:53 +0200
parents 28077e7631a7
children 2752a5368008
files MoinMoin/search/_tests/test_search.py
diffstat 1 files changed, 6 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/search/_tests/test_search.py	Wed Jul 22 08:48:00 2009 +0200
+++ b/MoinMoin/search/_tests/test_search.py	Wed Jul 22 12:07:53 2009 +0200
@@ -114,21 +114,17 @@
 
     def testIndex(self):
         """ search: kicks off indexing for a single pages in Xapian """
-
-        # AD - This only tests the the call to indexing doesn't raise.
-
+        # This only tests that the call to indexing doesn't raise.
+        nuke_xapian_index(self.request)
         idx = Xapian.Index(self.request)
-        idx.indexPages(['HomePageWiki'], mode='add')
-        nuke_xapian_index(self.request)
+        idx.indexPages(mode='add') # slow: builds an index of all pages
 
     def testIndexInNewThread(self):
         """ search: kicks off indexing for a page in a new thread in Xapian"""
-
-        # AD - This only tests the the call to indexing doesn't raise.
-
+        # This only tests that the call to indexing doesn't raise.
+        nuke_xapian_index(self.request)
         idx = Xapian.Index(self.request)
-        idx.indexPagesInNewThread(['HomePageWiki'], mode='add')
-        nuke_xapian_index(self.request)
+        idx.indexPagesInNewThread(mode='add') # slow: builds an index of all pages
 
 coverage_modules = ['MoinMoin.search']