[Zodb-checkins] CVS: StandaloneZODB/ZODB/tests - StorageTestBase.py:1.9.18.4
Jeremy Hylton
jeremy@zope.com
Thu, 10 Jan 2002 01:09:07 -0500
Update of /cvs-repository/StandaloneZODB/ZODB/tests
In directory cvs.zope.org:/tmp/cvs-serv5405
Modified Files:
Tag: Standby-branch
StorageTestBase.py
Log Message:
Only call close() on storage if there is one.
=== StandaloneZODB/ZODB/tests/StorageTestBase.py 1.9.18.3 => 1.9.18.4 ===
# You need to override this with a setUp that creates self._storage
self._transaction = Transaction()
+ self._storage = None
def _close(self):
# You should override this if closing your storage requires additional
# shutdown operations.
- self._transaction.abort()
- self._storage.close()
+ if self._transaction:
+ self._transaction.abort()
+ if self._storage is not None:
+ self._storage.close()
def tearDown(self):
self._close()