Patch from Trent Nelson. Also simplified removing a file by using test_support.
def tearDown(self):
self.do_close()
- try:
- os.remove(self.filename)
- except os.error:
- pass
+ test_support.unlink(self.filename)
def mk(self, key):
"""Turn key into an appropriate key type for this db"""
def tearDown(self):
- test_support.rmtree(self.homeDir)
self.do_close()
+ test_support.rmtree(self.homeDir)
class EnvBTreeShelveTestCase(BasicEnvShelveTestCase):
self.d.open(self.filename, self.dbtype, self.dbopenflags|db.DB_CREATE)
def tearDown(self):
- test_support.rmtree(self.homeDir)
self.d.close()
self.env.close()
+ test_support.rmtree(self.homeDir)
def setEnvOpts(self):
pass