summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorNed Deily <nad@acm.org>2012-08-09 03:57:24 (GMT)
committerNed Deily <nad@acm.org>2012-08-09 03:57:24 (GMT)
commitc622f4254b945806d72f573bf7e530dff4d639bb (patch)
treee033817f40088241e46fac6e246e1f1549bc0021 /Lib
parent05c35a6a6b62f9037ec15e5e60d5e17563adb128 (diff)
downloadcpython-c622f4254b945806d72f573bf7e530dff4d639bb.zip
cpython-c622f4254b945806d72f573bf7e530dff4d639bb.tar.gz
cpython-c622f4254b945806d72f573bf7e530dff4d639bb.tar.bz2
Issue #14992: Prevent test_os test_exist_ok_s_isgid_directory test case
failure on OS X built with 10.4 ABI.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_os.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index 605d2a4..ef14733 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -592,7 +592,10 @@ class MakedirTests(unittest.TestCase):
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