diff test/test_indexer.py @ 3546:a4edd24c32be

test fixes and checking of indexer overwrites (xapian currently fails)
author Richard Jones <richard@users.sourceforge.net>
date Tue, 07 Feb 2006 04:14:32 +0000
parents 8f7dc283bfa5
children 7728ee93efd2
line wrap: on
line diff
--- a/test/test_indexer.py	Tue Feb 07 04:14:02 2006 +0000
+++ b/test/test_indexer.py	Tue Feb 07 04:14:32 2006 +0000
@@ -18,13 +18,15 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 # SOFTWARE.
 
-# $Id: test_indexer.py,v 1.8 2005-04-28 09:06:09 richard Exp $
+# $Id: test_indexer.py,v 1.9 2006-02-07 04:14:32 richard Exp $
 
 import os, unittest, shutil
 
 class db:
-    class config:
+    class config(dict):
         DATABASE = 'test-index'
+    config = config()
+    config[('main', 'indexer_stopwords')] = []
 
 class IndexerTest(unittest.TestCase):
     def setUp(self):
@@ -44,6 +46,10 @@
         self.assertEqual(self.dex.find(['blah']), [('test', '2', 'foo')])
         self.assertEqual(self.dex.find(['blah', 'hello']), [])
 
+        # change
+        self.dex.add_text(('test', '1', 'foo'), 'a the hello')
+        self.assertEqual(self.dex.find(['world']), [('test', '2', 'foo')])
+
     def tearDown(self):
         shutil.rmtree('test-index')
 

Roundup Issue Tracker: http://roundup-tracker.org/