summaryrefslogtreecommitdiffstats
path: root/Lib/bsddb/test
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/bsddb/test')
-rw-r--r--Lib/bsddb/test/test_dbshelve.py7
-rw-r--r--Lib/bsddb/test/test_thread.py2
2 files changed, 3 insertions, 6 deletions
diff --git a/Lib/bsddb/test/test_dbshelve.py b/Lib/bsddb/test/test_dbshelve.py
index 2107085..752ebc3 100644
--- a/Lib/bsddb/test/test_dbshelve.py
+++ b/Lib/bsddb/test/test_dbshelve.py
@@ -40,10 +40,7 @@ class DBShelveTestCase(unittest.TestCase):
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"""
@@ -267,8 +264,8 @@ class BasicEnvShelveTestCase(DBShelveTestCase):
def tearDown(self):
- test_support.rmtree(self.homeDir)
self.do_close()
+ test_support.rmtree(self.homeDir)
class EnvBTreeShelveTestCase(BasicEnvShelveTestCase):
diff --git a/Lib/bsddb/test/test_thread.py b/Lib/bsddb/test/test_thread.py
index 15ed905..0395f6d 100644
--- a/Lib/bsddb/test/test_thread.py
+++ b/Lib/bsddb/test/test_thread.py
@@ -73,9 +73,9 @@ class BaseThreadedTestCase(unittest.TestCase):
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