[Python-checkins] cpython (merge 3.2 -> default): Issue #8746: Use tempfile module to get tempdir and randomize the
ned.deily
python-checkins at python.org
Tue Jul 26 23:00:15 CEST 2011
http://hg.python.org/cpython/rev/080035e58bab
changeset: 71509:080035e58bab
parent: 71506:4feb889d3bed
parent: 71508:4e4554aa1453
user: Ned Deily <nad at acm.org>
date: Tue Jul 26 13:56:49 2011 -0700
summary:
Issue #8746: Use tempfile module to get tempdir and randomize the
link file name.
files:
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
--- a/Lib/test/test_posix.py
+++ b/Lib/test/test_posix.py
@@ -13,10 +13,12 @@
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):
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list