[Python-checkins] r42972 - python/trunk/Lib/bsddb/test/test_associate.py
thomas.wouters
python-checkins at python.org
Sun Mar 12 01:13:10 CET 2006
Author: thomas.wouters
Date: Sun Mar 12 01:13:09 2006
New Revision: 42972
Modified:
python/trunk/Lib/bsddb/test/test_associate.py
Log:
Plug the last 657 referenceleaks in test_bsddb3: a circular reference
between a TestCase instance, the database it opened (or a cursor to a
database) and a bound method as a registered database callback, and a lack
of GC-handling in bsddb caused the TestCases to linger. Fix the test, for
now, as backward compatibility makes adding GC to bsddb annoying.
Modified: python/trunk/Lib/bsddb/test/test_associate.py
==============================================================================
--- python/trunk/Lib/bsddb/test/test_associate.py (original)
+++ python/trunk/Lib/bsddb/test/test_associate.py Sun Mar 12 01:13:09 2006
@@ -105,6 +105,7 @@
def tearDown(self):
self.env.close()
+ self.env = None
import glob
files = glob.glob(os.path.join(self.homeDir, '*'))
for file in files:
@@ -166,6 +167,7 @@
def tearDown(self):
self.closeDB()
self.env.close()
+ self.env = None
import glob
files = glob.glob(os.path.join(self.homeDir, '*'))
for file in files:
@@ -192,9 +194,12 @@
def closeDB(self):
if self.cur:
self.cur.close()
+ self.cur = None
if self.secDB:
self.secDB.close()
+ self.secDB = None
self.primary.close()
+ self.primary = None
def getDB(self):
return self.primary
More information about the Python-checkins
mailing list