[Zodb-checkins] CVS: ZODB3/ZODB/tests - Corruption.py:1.8.2.1 StorageTestBase.py:1.29.2.2 testFileStorage.py:1.34.2.1

Jeremy Hylton cvs-admin at zope.org
Tue Nov 11 17:17:31 EST 2003


Update of /cvs-repository/ZODB3/ZODB/tests
In directory cvs.zope.org:/tmp/cvs-serv10702/ZODB/tests

Modified Files:
      Tag: ZODB3-mvcc-2-branch
	Corruption.py StorageTestBase.py testFileStorage.py 
Log Message:
Remove removefs() in favor of FileStorage's cleanup() method.


=== ZODB3/ZODB/tests/Corruption.py 1.8 => 1.8.2.1 ===
--- ZODB3/ZODB/tests/Corruption.py:1.8	Thu Oct  2 14:17:17 2003
+++ ZODB3/ZODB/tests/Corruption.py	Tue Nov 11 17:17:30 2003
@@ -20,7 +20,7 @@
 import unittest
 
 import ZODB, ZODB.FileStorage
-from StorageTestBase import StorageTestBase, removefs
+from StorageTestBase import StorageTestBase
 
 class FileStorageCorruptTests(StorageTestBase):
 
@@ -30,7 +30,7 @@
 
     def tearDown(self):
         self._storage.close()
-        removefs(self.path)
+        self._storage.cleanup()
 
     def _do_stores(self):
         oids = []


=== ZODB3/ZODB/tests/StorageTestBase.py 1.29.2.1 => 1.29.2.2 ===
--- ZODB3/ZODB/tests/StorageTestBase.py:1.29.2.1	Tue Oct  7 01:10:31 2003
+++ ZODB3/ZODB/tests/StorageTestBase.py	Tue Nov 11 17:17:30 2003
@@ -134,16 +134,6 @@
     mod = __import__(name)
     return sys.modules[name]
 
-def removefs(base):
-    """Remove all files created by FileStorage with path base."""
-    for ext in '', '.old', '.tmp', '.lock', '.index', '.pack':
-        path = base + ext
-        try:
-            os.remove(path)
-        except os.error, err:
-            if err[0] != errno.ENOENT:
-                raise
-
 
 class StorageTestBase(unittest.TestCase):
 


=== ZODB3/ZODB/tests/testFileStorage.py 1.34 => 1.34.2.1 ===
--- ZODB3/ZODB/tests/testFileStorage.py:1.34	Thu Oct  2 14:17:17 2003
+++ ZODB3/ZODB/tests/testFileStorage.py	Tue Nov 11 17:17:30 2003
@@ -58,7 +58,7 @@
 
     def tearDown(self):
         self._storage.close()
-        StorageTestBase.removefs("FileStorageTests.fs")
+        self._storage.cleanup()
 
     def checkLongMetadata(self):
         s = "X" * 75000
@@ -186,19 +186,16 @@
     ):
 
     def setUp(self):
-        StorageTestBase.removefs("Source.fs")
-        StorageTestBase.removefs("Dest.fs")
         self._storage = ZODB.FileStorage.FileStorage('Source.fs')
         self._dst = ZODB.FileStorage.FileStorage('Dest.fs')
 
     def tearDown(self):
         self._storage.close()
         self._dst.close()
-        StorageTestBase.removefs("Source.fs")
-        StorageTestBase.removefs("Dest.fs")
+        self._storage.cleanup()
+        self._dst.cleanup()
 
     def new_dest(self):
-        StorageTestBase.removefs('Dest.fs')
         return ZODB.FileStorage.FileStorage('Dest.fs')
 
 




More information about the Zodb-checkins mailing list