diff options
Diffstat (limited to 'Lib/bsddb/test/test_sequence.py')
| -rw-r--r-- | Lib/bsddb/test/test_sequence.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Lib/bsddb/test/test_sequence.py b/Lib/bsddb/test/test_sequence.py index d7029e5..86c58b0 100644 --- a/Lib/bsddb/test/test_sequence.py +++ b/Lib/bsddb/test/test_sequence.py @@ -1,7 +1,6 @@ import unittest import os import tempfile -import glob try: # For Pythons w/distutils pybsddb @@ -13,7 +12,7 @@ except ImportError: class DBSequenceTest(unittest.TestCase): def setUp(self): self.int_32_max = 0x100000000 - self.homeDir = os.path.join(tempfile.gettempdir(), 'db_home') + self.homeDir = os.path.join(tempfile.gettempdir(), 'db_home%d'%os.getpid()) try: os.mkdir(self.homeDir) except os.error: @@ -38,9 +37,8 @@ class DBSequenceTest(unittest.TestCase): self.dbenv.close() del self.dbenv - 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 test_get(self): self.seq = db.DBSequence(self.d, flags=0) |
