mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Consistently use tempfile.tempdir for the db_home directory.
This commit is contained in:
parent
7f47d93f52
commit
3d785e2c6a
5 changed files with 8 additions and 5 deletions
|
@ -1,4 +1,5 @@
|
|||
import unittest
|
||||
import tempfile
|
||||
import sys, os, glob
|
||||
|
||||
try:
|
||||
|
@ -16,7 +17,7 @@ class pget_bugTestCase(unittest.TestCase):
|
|||
db_name = 'test-cursor_pget.db'
|
||||
|
||||
def setUp(self):
|
||||
self.homeDir = os.path.join(os.path.dirname(sys.argv[0]), 'db_home')
|
||||
self.homeDir = os.path.join(tempfile.gettempdir(), 'db_home')
|
||||
try:
|
||||
os.mkdir(self.homeDir)
|
||||
except os.error:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue