summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorNed Deily <nad@acm.org>2011-07-26 20:53:55 (GMT)
committerNed Deily <nad@acm.org>2011-07-26 20:53:55 (GMT)
commitba2eab25ff54209d119ce9e0c7dd88bdf76b5460 (patch)
tree00a80addcfce68690a2a7a0f3105b400d369d5e2 /Lib/test
parent76748b7033cdd52a95d78d85f2ec15244e5d0fd8 (diff)
downloadcpython-ba2eab25ff54209d119ce9e0c7dd88bdf76b5460.zip
cpython-ba2eab25ff54209d119ce9e0c7dd88bdf76b5460.tar.gz
cpython-ba2eab25ff54209d119ce9e0c7dd88bdf76b5460.tar.bz2
Issue #8746: Use tempfile module to get tempdir and randomize the
link file name.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_posix.py4
1 files changed, 3 insertions, 1 deletions
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):