diff options
Diffstat (limited to 'Lib/bsddb/test/test_dbobj.py')
| -rw-r--r-- | Lib/bsddb/test/test_dbobj.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Lib/bsddb/test/test_dbobj.py b/Lib/bsddb/test/test_dbobj.py index dd9909d..071b547 100644 --- a/Lib/bsddb/test/test_dbobj.py +++ b/Lib/bsddb/test/test_dbobj.py @@ -1,7 +1,6 @@ import os, string import unittest -import glob import tempfile try: @@ -20,7 +19,7 @@ class dbobjTestCase(unittest.TestCase): db_name = 'test-dbobj.db' def setUp(self): - 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) except os.error: pass @@ -30,9 +29,8 @@ class dbobjTestCase(unittest.TestCase): del self.db if hasattr(self, 'env'): del self.env - files = glob.glob(os.path.join(self.homeDir, '*')) - for file in files: - os.remove(file) + from test import test_support + test_support.rmtree(self.homeDir) def test01_both(self): class TestDBEnv(dbobj.DBEnv): pass |
