summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_os.py
diff options
context:
space:
mode:
authorNed Deily <nad@acm.org>2012-08-09 04:03:02 (GMT)
committerNed Deily <nad@acm.org>2012-08-09 04:03:02 (GMT)
commit3a2b97e48aad00b936be16b600be80356cdaba76 (patch)
treed4d2a537c363fce0e3919146bf0a41597714503c /Lib/test/test_os.py
parent3cc635dabb0780914d51cdfad57912608196d099 (diff)
parentc622f4254b945806d72f573bf7e530dff4d639bb (diff)
downloadcpython-3a2b97e48aad00b936be16b600be80356cdaba76.zip
cpython-3a2b97e48aad00b936be16b600be80356cdaba76.tar.gz
cpython-3a2b97e48aad00b936be16b600be80356cdaba76.tar.bz2
Issue #14992: merge from 3.2
Diffstat (limited to 'Lib/test/test_os.py')
-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 5c0b0c8..6219eff 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -863,7 +863,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 PermissionError:
+ 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