From ba2eab25ff54209d119ce9e0c7dd88bdf76b5460 Mon Sep 17 00:00:00 2001 From: Ned Deily Date: Tue, 26 Jul 2011 13:53:55 -0700 Subject: Issue #8746: Use tempfile module to get tempdir and randomize the link file name. --- Lib/test/test_posix.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py index 5563050..09f04ec 100644 --- a/Lib/test/test_posix.py +++ b/Lib/test/test_posix.py @@ -12,10 +12,12 @@ import os import pwd import shutil import stat +import tempfile import unittest import warnings -_DUMMY_SYMLINK = '%s/dummy-symlink' % os.getenv('TMPDIR', '/tmp') +_DUMMY_SYMLINK = os.path.join(tempfile.gettempdir(), + support.TESTFN + '-dummy-symlink') class PosixTester(unittest.TestCase): -- cgit v0.12