[Python-checkins] cpython (3.2): Issue #14992: Prevent test_os test_exist_ok_s_isgid_directory test case
ned.deily
python-checkins at python.org
Thu Aug 9 06:03:47 CEST 2012
http://hg.python.org/cpython/rev/3f42c9dbd8a7
changeset: 78471:3f42c9dbd8a7
branch: 3.2
parent: 78453:768b188262e7
user: Ned Deily <nad at acm.org>
date: Wed Aug 08 20:57:24 2012 -0700
summary:
Issue #14992: Prevent test_os test_exist_ok_s_isgid_directory test case
failure on OS X built with 10.4 ABI.
files:
Lib/test/test_os.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -592,7 +592,10 @@
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
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list