summaryrefslogtreecommitdiff
path: root/Lib/bsddb/test/test_cursor_pget_bug.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/bsddb/test/test_cursor_pget_bug.py')
-rw-r--r--Lib/bsddb/test/test_cursor_pget_bug.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/bsddb/test/test_cursor_pget_bug.py b/Lib/bsddb/test/test_cursor_pget_bug.py
index 2af12bf86f..32dd8a5b8b 100644
--- a/Lib/bsddb/test/test_cursor_pget_bug.py
+++ b/Lib/bsddb/test/test_cursor_pget_bug.py
@@ -1,4 +1,5 @@
import unittest
+import tempfile
import sys, os, glob
import shutil
import tempfile
@@ -13,7 +14,11 @@ class pget_bugTestCase(unittest.TestCase):
db_name = 'test-cursor_pget.db'
def setUp(self):
- self.homeDir = tempfile.mkdtemp()
+ self.homeDir = os.path.join(tempfile.gettempdir(), 'db_home')
+ try:
+ os.mkdir(self.homeDir)
+ except os.error:
+ pass
self.env = db.DBEnv()
self.env.open(self.homeDir, db.DB_CREATE | db.DB_INIT_MPOOL)
self.primary_db = db.DB(self.env)