diff options
author | Ned Deily <nad@acm.org> | 2011-07-26 20:56:49 (GMT) |
---|---|---|
committer | Ned Deily <nad@acm.org> | 2011-07-26 20:56:49 (GMT) |
commit | 0975dedfe08f46b76292d779b85cfe38a57cec9d (patch) | |
tree | 8c420cb75523a36b507598d363f1a3a19bf428b6 | |
parent | 76eec3db2173079ce103fbd3ac53892ddec8b963 (diff) | |
parent | ba2eab25ff54209d119ce9e0c7dd88bdf76b5460 (diff) | |
download | cpython-0975dedfe08f46b76292d779b85cfe38a57cec9d.zip cpython-0975dedfe08f46b76292d779b85cfe38a57cec9d.tar.gz cpython-0975dedfe08f46b76292d779b85cfe38a57cec9d.tar.bz2 |
Issue #8746: Use tempfile module to get tempdir and randomize the
link file name.
-rw-r--r-- | Lib/test/test_posix.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py index 14bd356..ce38669 100644 --- a/Lib/test/test_posix.py +++ b/Lib/test/test_posix.py @@ -13,10 +13,12 @@ import fcntl 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): |