[Zope3-checkins] CVS: Zope3/src/zodb/code/tests -
test_module.py:1.13.26.4
Jim Fulton
jim at zope.com
Fri Jan 30 11:16:53 EST 2004
Update of /cvs-repository/Zope3/src/zodb/code/tests
In directory cvs.zope.org:/tmp/cvs-serv10023/src/zodb/code/tests
Modified Files:
Tag: zope3-zodb3-devel-branch
test_module.py
Log Message:
Changed the to open and close the database as part of setUp and
tearDown. In the test, just close and open the connection.
=== Zope3/src/zodb/code/tests/test_module.py 1.13.26.3 => 1.13.26.4 ===
--- Zope3/src/zodb/code/tests/test_module.py:1.13.26.3 Fri Jan 23 15:44:34 2004
+++ Zope3/src/zodb/code/tests/test_module.py Fri Jan 30 11:16:52 2004
@@ -357,16 +357,17 @@
"""Test reloading of modules"""
def setUp(self):
+ self.db = ZODB.tests.util.DB()
self.open()
_dir, _file = os.path.split(tests.__file__)
self._pmtest = os.path.join(_dir, "_pmtest.py")
def tearDown(self):
get_transaction().abort()
+ self.db.close()
def open(self):
# open a new db and importer from the storage
- self.db = ZODB.tests.util.DB()
self.root = self.db.open().root()
self.registry = self.root.get("registry")
if self.registry is None:
@@ -377,7 +378,7 @@
def close(self):
self.importer.uninstall()
- self.db.close()
+ self.root._p_jar.close()
def testModuleReload(self):
self.registry.newModule("pmtest", open(self._pmtest).read())
More information about the Zope3-Checkins
mailing list