[Python-checkins] r53920 - python/branches/release25-maint/Lib/test/test_dbm.py python/branches/release25-maint/Lib/test/test_gdbm.py
thomas.wouters
python-checkins at python.org
Sun Feb 25 23:15:07 CET 2007
Author: thomas.wouters
Date: Sun Feb 25 23:15:04 2007
New Revision: 53920
Modified:
python/branches/release25-maint/Lib/test/test_dbm.py
python/branches/release25-maint/Lib/test/test_gdbm.py
Log:
Backported r51621 from p3yk:
Don't use a fixed temporary name (gdbm).
Don't use our own temp name creation (dbm).
Modified: python/branches/release25-maint/Lib/test/test_dbm.py
==============================================================================
--- python/branches/release25-maint/Lib/test/test_dbm.py (original)
+++ python/branches/release25-maint/Lib/test/test_dbm.py Sun Feb 25 23:15:04 2007
@@ -6,11 +6,11 @@
import random
import dbm
from dbm import error
-from test.test_support import verbose, verify, TestSkipped
+from test.test_support import verbose, verify, TestSkipped, TESTFN
# make filename unique to allow multiple concurrent tests
# and to minimize the likelihood of a problem from an old file
-filename = '/tmp/delete_me_' + str(random.random())[-6:]
+filename = TESTFN
def cleanup():
for suffix in ['', '.pag', '.dir', '.db']:
Modified: python/branches/release25-maint/Lib/test/test_gdbm.py
==============================================================================
--- python/branches/release25-maint/Lib/test/test_gdbm.py (original)
+++ python/branches/release25-maint/Lib/test/test_gdbm.py Sun Feb 25 23:15:04 2007
@@ -5,9 +5,9 @@
import gdbm
from gdbm import error
-from test.test_support import verbose, verify, TestFailed
+from test.test_support import verbose, verify, TestFailed, TESTFN
-filename= '/tmp/delete_me'
+filename = TESTFN
g = gdbm.open(filename, 'c')
verify(g.keys() == [])
More information about the Python-checkins
mailing list