From f35ad33064fb81de3ea4499285d2748c8e5629f1 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 25 Aug 2006 23:40:32 +0000 Subject: [PATCH] Don't use a fixed temporary name (gdbm). Don't use our own temp name creation (dbm). Should be backported to 2.5. --- Lib/test/test_dbm.py | 4 ++-- Lib/test/test_gdbm.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Lib/test/test_dbm.py b/Lib/test/test_dbm.py index 8fdd2628669..ed92bfe0d95 100755 --- a/Lib/test/test_dbm.py +++ b/Lib/test/test_dbm.py @@ -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']: diff --git a/Lib/test/test_gdbm.py b/Lib/test/test_gdbm.py index e76539af76c..a68957633ae 100755 --- a/Lib/test/test_gdbm.py +++ b/Lib/test/test_gdbm.py @@ -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() == [])