summaryrefslogtreecommitdiff
path: root/Lib/bsddb/test/test_dbobj.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/bsddb/test/test_dbobj.py')
-rw-r--r--Lib/bsddb/test/test_dbobj.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/Lib/bsddb/test/test_dbobj.py b/Lib/bsddb/test/test_dbobj.py
index 22d46bc028..2d0f916a87 100644
--- a/Lib/bsddb/test/test_dbobj.py
+++ b/Lib/bsddb/test/test_dbobj.py
@@ -2,7 +2,6 @@
import shutil
import sys, os
import unittest
-import glob
import tempfile
try:
@@ -20,14 +19,18 @@ class dbobjTestCase(unittest.TestCase):
db_name = 'test-dbobj.db'
def setUp(self):
- self.homeDir = tempfile.mkdtemp()
+ homeDir = os.path.join(tempfile.gettempdir(), 'db_home%d'%os.getpid())
+ self.homeDir = homeDir
+ try: os.mkdir(homeDir)
+ except os.error: pass
def tearDown(self):
if hasattr(self, 'db'):
del self.db
if hasattr(self, 'env'):
del self.env
- shutil.rmtree(self.homeDir)
+ from test import test_support
+ test_support.rmtree(self.homeDir)
def test01_both(self):
class TestDBEnv(dbobj.DBEnv): pass