[Zope-Checkins] CVS: Zope2 - testUnTextIndex.py:1.1.2.5

Jim Fulton jim@digiciool.com
Wed, 14 Mar 2001 11:30:22 -0500 (EST)


Update of /cvs-repository/Zope2/lib/python/SearchIndex/tests
In directory korak:/tmp/cvs-serv7153

Modified Files:
      Tag: Catalog-BTrees-Integration
	testUnTextIndex.py 
Log Message:
Added standard path munging.

Made some tests a little more explicit.


--- Updated File testUnTextIndex.py in package Zope2 --
--- testUnTextIndex.py	2001/03/05 15:42:46	1.1.2.4
+++ testUnTextIndex.py	2001/03/14 16:30:22	1.1.2.5
@@ -85,16 +85,17 @@
 
 import sys, os
 
+sys.path.insert(0, os.getcwd())
+try: import unittest
+except:
+    sys.path[0]=os.path.join(sys.path[0],'..','..')
+    import unittest
+
 class Dummy:
 
     def __init__(self, **kw):
         self.__dict__.update(kw)
 
-try: import unittest
-except:
-    sys.path.insert(0, os.getcwd())
-    import unittest
-
 import zLOG
 
 def log_write(subsystem, severity, summary, detail, error):
@@ -146,8 +147,11 @@
    def checkPersistentUpdate1(self):
        "Check simple persistent indexing"
        index=self.dbopen()
+
+       self.doc.text='this is the time, when all good zopes'
        index.index_object(0, self.doc)
        get_transaction().commit()
+
        self.doc.text='time waits for no one'
        index.index_object(1, self.doc)
        get_transaction().commit()
@@ -170,6 +174,7 @@
        "Check less simple persistent indexing"
        index=self.dbopen()
 
+       self.doc.text='this is the time, when all good zopes'
        index.index_object(0, self.doc)
        get_transaction().commit()