[Zope-Checkins] CVS: Zope/lib/python/Products/ZCTextIndex/tests - testIndex.py:1.11.10.2 testLexicon.py:1.3.10.4

Casey Duncan casey@zope.com
Tue, 15 Jul 2003 09:40:00 -0400


Update of /cvs-repository/Zope/lib/python/Products/ZCTextIndex/tests
In directory cvs.zope.org:/tmp/cvs-serv20074/tests

Modified Files:
      Tag: Zope-2_6-branch
	testIndex.py testLexicon.py 
Log Message:
Collector #960: Conflict tests now cleanup their tempfiles properly


=== Zope/lib/python/Products/ZCTextIndex/tests/testIndex.py 1.11.10.1 => 1.11.10.2 ===
--- Zope/lib/python/Products/ZCTextIndex/tests/testIndex.py:1.11.10.1	Thu Jun  5 16:37:05 2003
+++ Zope/lib/python/Products/ZCTextIndex/tests/testIndex.py	Tue Jul 15 09:39:54 2003
@@ -162,14 +162,16 @@
     storage = None
 
     def tearDown(self):
+        from ZODB.tests.StorageTestBase import removefs
         if self.storage is not None:
             self.storage.close()
+        removefs(self.fsname)
 
     def openDB(self):
         from ZODB.FileStorage import FileStorage
         from ZODB.DB import DB
-        n = 'fs_tmp__%s' % os.getpid()
-        self.storage = FileStorage(n)
+        self.fsname = 'fs_tmp__%s' % os.getpid()
+        self.storage = FileStorage(self.fsname)
         self.db = DB(self.storage)
         
     def test_index_doc_conflict(self):


=== Zope/lib/python/Products/ZCTextIndex/tests/testLexicon.py 1.3.10.3 => 1.3.10.4 ===
--- Zope/lib/python/Products/ZCTextIndex/tests/testLexicon.py:1.3.10.3	Thu Jun  5 16:37:05 2003
+++ Zope/lib/python/Products/ZCTextIndex/tests/testLexicon.py	Tue Jul 15 09:39:54 2003
@@ -149,14 +149,16 @@
     storage = None
 
     def tearDown(self):
+        from ZODB.tests.StorageTestBase import removefs
         if self.storage is not None:
             self.storage.close()
+        removefs(self.fsname)
 
     def openDB(self):
         from ZODB.FileStorage import FileStorage
         from ZODB.DB import DB
-        n = 'fs_tmp__%s' % os.getpid()
-        self.storage = FileStorage(n)
+        self.fsname = 'fs_tmp__%s' % os.getpid()
+        self.storage = FileStorage(self.fsname)
         self.db = DB(self.storage)
         
     def testAddWordConflict(self):