[Zope-Checkins] CVS: Zope/lib/python/AccessControl/tests - testBindings.py:1.1.2.6

Tim Peters tim.one at comcast.net
Mon Jan 26 19:23:00 EST 2004


Update of /cvs-repository/Zope/lib/python/AccessControl/tests
In directory cvs.zope.org:/tmp/cvs-serv27402/lib/python/AccessControl/tests

Modified Files:
      Tag: Zope-2_6-branch
	testBindings.py 
Log Message:
TestBindings setUp() and tearDown():  every time a database is opened,
it must be closed explicitly, to give it a chance to delete temp files
and release file locks.  This simple change fixes more than 50 test
errors on Windows (the first failure to release the file lock caused
all subsequent operations on the lock file to fail -- Windows file locks
aren't just advisory).


=== Zope/lib/python/AccessControl/tests/testBindings.py 1.1.2.5 => 1.1.2.6 ===
--- Zope/lib/python/AccessControl/tests/testBindings.py:1.1.2.5	Mon Jan 26 16:41:10 2004
+++ Zope/lib/python/AccessControl/tests/testBindings.py	Mon Jan 26 19:22:58 2004
@@ -94,7 +94,8 @@
     def setUp(self):
         from Testing.ZODButil import makeDB
         get_transaction().begin()
-        self.connection = makeDB().open()
+        self.db = makeDB()
+        self.connection = self.db.open()
 
     def tearDown(self):
         from Testing.ZODButil import cleanDB
@@ -102,6 +103,7 @@
         noSecurityManager()
         get_transaction().abort()
         self.connection.close()
+        self.db.close()
         cleanDB()
 
     def _getRoot(self):




More information about the Zope-Checkins mailing list