mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
[Patch #1520904] Fix bsddb tests to write to the temp directory instead of the Lib/bsddb/test directory
This commit is contained in:
parent
882680462c
commit
9c3a392321
11 changed files with 17 additions and 14 deletions
|
@ -2,6 +2,7 @@
|
|||
import sys, os, string
|
||||
import unittest
|
||||
import glob
|
||||
import tempfile
|
||||
|
||||
try:
|
||||
# For Pythons w/distutils pybsddb
|
||||
|
@ -19,7 +20,7 @@ class dbobjTestCase(unittest.TestCase):
|
|||
db_name = 'test-dbobj.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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue