From 25e7cfa4b9aec196047de80bcd28bff8f3f0dd43 Mon Sep 17 00:00:00 2001 From: Thomas Wouters Date: Sun, 25 Feb 2007 22:15:04 +0000 Subject: [PATCH] Backported r51621 from p3yk: Don't use a fixed temporary name (gdbm). Don't use our own temp name creation (dbm). --- 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 e5757c9501a..b93e72eb728 100755 --- a/Lib/test/test_dbm.py +++ b/Lib/test/test_dbm.py @@ -6,11 +6,11 @@ import os 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 03a47d9c245..8e6f76f1702 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() == [])