[Python-checkins] r86820 - python/branches/py3k-stat-on-windows/Lib/test/test_os.py

hirokazu.yamamoto python-checkins at python.org
Fri Nov 26 20:19:45 CET 2010


Author: hirokazu.yamamoto
Date: Fri Nov 26 20:19:45 2010
New Revision: 86820

Log:
Test didn't fail.... Added debug print.

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 20:19:45 2010
@@ -1160,7 +1160,23 @@
         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 f(s):
+            print("-------->", s, oct(s.st_mode))
+            self.assertFalse(s.st_mode & stat.S_IEXEC)
+        print("======================")
+        print(">>>>", oct(stat.S_IEXEC))
+        f(os.stat(self.filelink))
+        f(os.lstat(self.filelink))
+        f(os.stat(self.filelink_target))
+        f(os.lstat(self.filelink_target))
+        print("=====================")
+        path = "foobarbaz.bat"
+        with open(path, "w") as w:
+            w.write(path)
+        f(os.stat(path))
+        f(os.lstat(path))
+        os.remove(path)
+        print("======================")
 
     def _create_missing_dir_link(self):
         'Create a "directory" link to a non-existent target'


More information about the Python-checkins mailing list