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.
def tearDown(self):
self.env.close()
+ self.env = None
import glob
files = glob.glob(os.path.join(self.homeDir, '*'))
for file in files:
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:
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