Commit 13510438 authored by Barry Warsaw's avatar Barry Warsaw

class CommitAndRead can inherit from test_create.BaseFramework for

more code sharing.

DBHOME is unused, remove.
parent c702bc72
...@@ -6,38 +6,11 @@ import os ...@@ -6,38 +6,11 @@ import os
import errno import errno
import time import time
import unittest import unittest
import test_create
DBHOME = 'test-db'
class CommitAndRead(unittest.TestCase): class CommitAndRead(test_create.BaseFramework):
# 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)
def checkCommit(self): def checkCommit(self):
from Persistence import PersistentMapping from Persistence import PersistentMapping
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment