Commit 06566737 authored by Barry Warsaw's avatar Barry Warsaw

Backport refactoring

parent 85847607
...@@ -93,8 +93,8 @@ class FullOpenCloseTest(BerkeleyTestBase.FullTestBase): ...@@ -93,8 +93,8 @@ class FullOpenCloseTest(BerkeleyTestBase.FullTestBase):
class OpenRecoveryTest(BerkeleyTestBase.FullTestBase): class OpenRecoveryTest(BerkeleyTestBase.FullTestBase):
def _mk_dbhome(self, dir): def open(self):
self._dir = dir self._storage = None
def testOpenWithBogusConfig(self): def testOpenWithBogusConfig(self):
class C: pass class C: pass
...@@ -102,9 +102,10 @@ class OpenRecoveryTest(BerkeleyTestBase.FullTestBase): ...@@ -102,9 +102,10 @@ class OpenRecoveryTest(BerkeleyTestBase.FullTestBase):
# This instance won't have the necessary attributes, so the creation # This instance won't have the necessary attributes, so the creation
# will fail. We want to be sure that everything gets cleaned up # will fail. We want to be sure that everything gets cleaned up
# enough to fix that and create a proper storage. # enough to fix that and create a proper storage.
self.assertRaises(AttributeError, BDBFullStorage, self._dir, config=c) dir = self._envdir()
self.assertRaises(AttributeError, BDBFullStorage, dir, config=c)
c = BerkeleyConfig() c = BerkeleyConfig()
s = BDBFullStorage(self._dir, config=c) s = BDBFullStorage(dir, config=c)
s.close() s.close()
......
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