[Python-checkins] r86809 - python/branches/py3k-stat-on-windows/Lib/test/test_os.py
hirokazu.yamamoto
python-checkins at python.org
Fri Nov 26 17:36:49 CET 2010
Author: hirokazu.yamamoto
Date: Fri Nov 26 17:36:48 2010
New Revision: 86809
Log:
On windows: when symlink has executable extension and target does not, os.stat(symlink)
should not set S_IEXEC. (Only test now)
Modified:
python/branches/py3k-stat-on-windows/Lib/test/test_os.py
Modified: python/branches/py3k-stat-on-windows/Lib/test/test_os.py
==============================================================================
--- python/branches/py3k-stat-on-windows/Lib/test/test_os.py (original)
+++ python/branches/py3k-stat-on-windows/Lib/test/test_os.py Fri Nov 26 17:36:48 2010
@@ -15,6 +15,7 @@
import contextlib
import mmap
import uuid
+import stat
# Detect whether we're on a Linux system that uses the (now outdated
# and unmaintained) linuxthreads threading library. There's an issue
@@ -1124,7 +1125,7 @@
@unittest.skipUnless(sys.platform == "win32", "Win32 specific tests")
@support.skip_unless_symlink
class Win32SymlinkTests(unittest.TestCase):
- filelink = 'filelinktest'
+ filelink = 'filelinktest.bat'
filelink_target = os.path.abspath(__file__)
dirlink = 'dirlinktest'
dirlink_target = os.path.dirname(filelink_target)
@@ -1158,6 +1159,7 @@
self.assertTrue(os.path.isfile(self.filelink))
self.assertTrue(os.path.islink(self.filelink))
self.check_stat(self.filelink, self.filelink_target)
+ self.assertFalse(os.stat(self.filelink).st_mode & stat.S_IEXEC)
def _create_missing_dir_link(self):
'Create a "directory" link to a non-existent target'
@@ -1192,7 +1194,6 @@
self.assertEqual(os.stat(link), os.stat(target))
self.assertNotEqual(os.lstat(link), os.stat(link))
-
class FSEncodingTests(unittest.TestCase):
def test_nop(self):
self.assertEqual(os.fsencode(b'abc\xff'), b'abc\xff')
More information about the Python-checkins
mailing list