diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py index 14bd356a0e1..ce3866971af 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):