[Zodb-checkins] CVS: Packages/bsddb3Storage - test_zodb_simple.py:1.2

barry@digicool.com barry@digicool.com
Tue, 3 Apr 2001 14:42:09 -0400 (EDT)


Update of /cvs-repository/Packages/bsddb3Storage/test
In directory korak:/tmp/cvs-serv13615

Modified Files:
	test_zodb_simple.py 
Log Message:
class CommitAndRead can inherit from test_create.BaseFramework for
more code sharing.

DBHOME is unused, remove.



--- Updated File test_zodb_simple.py in package Packages/bsddb3Storage --
--- test_zodb_simple.py	2001/04/02 23:09:47	1.1
+++ test_zodb_simple.py	2001/04/03 18:42:08	1.2
@@ -6,38 +6,11 @@
 import errno
 import time
 import unittest
+import test_create
 
-DBHOME = 'test-db'
 
-
 
-class CommitAndRead(unittest.TestCase):
-    # Never tear down the test framework since we want the database support
-    # files to persist.  MasterSetup will take care of cleaning things up when
-    # we're done.
-    def setUp(self):
-        from ZODB import DB
-
-        self._dbhome = DBHOME
-        try:
-            os.mkdir(self._dbhome)
-        except OSError, e:
-            if e.errno <> errno.EEXIST: raise
-
-        try:
-            self._storage = self.ConcreteStorage(self._dbhome)
-            self._db = DB(self._storage)
-            self._conn = self._db.open()
-            self._root = self._conn.root()
-        except:
-            self.tearDown()
-            raise
-
-    def tearDown(self):
-        for file in os.listdir(DBHOME):
-            os.unlink(os.path.join(DBHOME, file))
-        os.removedirs(DBHOME)
-        
+class CommitAndRead(test_create.BaseFramework):
     def checkCommit(self):
         from Persistence import PersistentMapping