summaryrefslogtreecommitdiffstats
path: root/Lib/bsddb/test/test_misc.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/bsddb/test/test_misc.py')
-rw-r--r--Lib/bsddb/test/test_misc.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/Lib/bsddb/test/test_misc.py b/Lib/bsddb/test/test_misc.py
index 3d566f1..a9228f9 100644
--- a/Lib/bsddb/test/test_misc.py
+++ b/Lib/bsddb/test/test_misc.py
@@ -17,7 +17,7 @@ except ImportError:
class MiscTestCase(unittest.TestCase):
def setUp(self):
self.filename = self.__class__.__name__ + '.db'
- homeDir = os.path.join(tempfile.gettempdir(), 'db_home')
+ homeDir = os.path.join(tempfile.gettempdir(), 'db_home%d'%os.getpid())
self.homeDir = homeDir
try:
os.mkdir(homeDir)
@@ -25,12 +25,9 @@ class MiscTestCase(unittest.TestCase):
pass
def tearDown(self):
- try:
- os.remove(self.filename)
- except OSError:
- pass
- import shutil
- shutil.rmtree(self.homeDir)
+ from test import test_support
+ test_support.unlink(self.filename)
+ test_support.rmtree(self.homeDir)
def test01_badpointer(self):
dbs = dbshelve.open(self.filename)