mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +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
|
@ -203,10 +203,10 @@ class SimpleRecnoTestCase(unittest.TestCase):
|
|||
just a line in the file, but you can set a different record delimiter
|
||||
if needed.
|
||||
"""
|
||||
source = os.path.join(os.path.dirname(sys.argv[0]),
|
||||
'db_home/test_recno.txt')
|
||||
if not os.path.isdir('db_home'):
|
||||
os.mkdir('db_home')
|
||||
homeDir = os.path.join(tempfile.gettempdir(), 'db_home')
|
||||
source = os.path.join(homeDir, 'test_recno.txt')
|
||||
if not os.path.isdir(homeDir):
|
||||
os.mkdir(homeDir)
|
||||
f = open(source, 'w') # create the file
|
||||
f.close()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue