Kaydet (Commit) f35ad330 authored tarafından Guido van Rossum's avatar Guido van Rossum

Don't use a fixed temporary name (gdbm).

Don't use our own temp name creation (dbm).
Should be backported to 2.5.
üst b65fb33b
...@@ -6,11 +6,11 @@ import os ...@@ -6,11 +6,11 @@ import os
import random import random
import dbm import dbm
from dbm import error 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 # make filename unique to allow multiple concurrent tests
# and to minimize the likelihood of a problem from an old file # and to minimize the likelihood of a problem from an old file
filename = '/tmp/delete_me_' + str(random.random())[-6:] filename = TESTFN
def cleanup(): def cleanup():
for suffix in ['', '.pag', '.dir', '.db']: for suffix in ['', '.pag', '.dir', '.db']:
......
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
import gdbm import gdbm
from gdbm import error 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') g = gdbm.open(filename, 'c')
verify(g.keys() == []) verify(g.keys() == [])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment