[Checkins] SVN: zodbupdate/trunk/src/zodbupdate/tests.py os.close needed to avoid windows failures
Adam Groszer
agroszer at gmail.com
Mon Sep 27 08:42:07 EDT 2010
Log message for revision 116982:
os.close needed to avoid windows failures
Changed:
U zodbupdate/trunk/src/zodbupdate/tests.py
-=-
Modified: zodbupdate/trunk/src/zodbupdate/tests.py
===================================================================
--- zodbupdate/trunk/src/zodbupdate/tests.py 2010-09-27 12:05:47 UTC (rev 116981)
+++ zodbupdate/trunk/src/zodbupdate/tests.py 2010-09-27 12:42:06 UTC (rev 116982)
@@ -56,7 +56,7 @@
sys.modules['module2'].OtherFactory = OtherFactory
OtherFactory.__module__ = 'module2'
- _, self.dbfile = tempfile.mkstemp()
+ self.tmphnd, self.dbfile = tempfile.mkstemp()
self.storage = ZODB.FileStorage.FileStorage(self.dbfile)
self.db = ZODB.DB(self.storage)
@@ -64,7 +64,9 @@
self.root = self.conn.root()
def update(self, **args):
+ self.conn.close()
self.db.close()
+ self.storage.close()
self.storage = ZODB.FileStorage.FileStorage(self.dbfile)
updater = zodbupdate.update.Updater(self.storage, **args)
@@ -82,7 +84,10 @@
del sys.modules['module1']
del sys.modules['module2']
+ self.conn.close()
self.db.close()
+ self.storage.close()
+ os.close(self.tmphnd)
os.unlink(self.dbfile)
os.unlink(self.dbfile + '.index')
os.unlink(self.dbfile + '.tmp')
More information about the checkins
mailing list