summaryrefslogtreecommitdiffstats
path: root/Lib/bsddb/test/test_dbshelve.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/bsddb/test/test_dbshelve.py')
-rw-r--r--Lib/bsddb/test/test_dbshelve.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/bsddb/test/test_dbshelve.py b/Lib/bsddb/test/test_dbshelve.py
index 64cf59a..c66c7c1 100644
--- a/Lib/bsddb/test/test_dbshelve.py
+++ b/Lib/bsddb/test/test_dbshelve.py
@@ -262,6 +262,10 @@ class BasicEnvShelveTestCase(DBShelveTestCase):
self.do_open()
def do_open(self):
+ self.homeDir = homeDir = os.path.join(
+ tempfile.gettempdir(), 'db_home%d'%os.getpid())
+ try: os.mkdir(homeDir)
+ except os.error: pass
self.env = db.DBEnv()
self.env.open(self.homeDir, self.envflags | db.DB_INIT_MPOOL | db.DB_CREATE)
@@ -275,9 +279,9 @@ class BasicEnvShelveTestCase(DBShelveTestCase):
def tearDown(self):
+ from test import test_support
+ test_support.rmtree(self.homeDir)
self.do_close()
- shutil.rmtree(self.homeDir)
-
class EnvBTreeShelveTestCase(BasicEnvShelveTestCase):