Commits

Ned Deily  committed 3f42c9d Draft

Issue #14992: Prevent test_os test_exist_ok_s_isgid_directory test case
failure on OS X built with 10.4 ABI.

  • Participants
  • Parent commits 768b188
  • Branches 3.2

Comments (0)

Files changed (1)

File Lib/test/test_os.py

         try:
             existing_testfn_mode = stat.S_IMODE(
                     os.lstat(support.TESTFN).st_mode)
-            os.chmod(support.TESTFN, existing_testfn_mode | S_ISGID)
+            try:
+                os.chmod(support.TESTFN, existing_testfn_mode | S_ISGID)
+            except OSError:
+                raise unittest.SkipTest('Cannot set S_ISGID for dir.')
             if (os.lstat(support.TESTFN).st_mode & S_ISGID != S_ISGID):
                 raise unittest.SkipTest('No support for S_ISGID dir mode.')
             # The os should apply S_ISGID from the parent dir for us, but