[Patch #1520904] Fix bsddb tests to write to the temp directory instead of the Lib/bsddb/test directory

This commit is contained in:
Andrew M. Kuchling 2007-01-05 15:51:24 +00:00
parent 882680462c
commit 9c3a392321
11 changed files with 17 additions and 14 deletions

View file

@ -26,6 +26,7 @@ try:
pickle = cPickle
except ImportError:
import pickle
import tempfile
import unittest
from test_all import verbose
@ -46,7 +47,7 @@ class TableDBTestCase(unittest.TestCase):
db_name = 'test-table.db'
def setUp(self):
homeDir = os.path.join(os.path.dirname(sys.argv[0]), 'db_home')
homeDir = os.path.join(tempfile.gettempdir(), 'db_home')
self.homeDir = homeDir
try: os.mkdir(homeDir)
except os.error: pass