summaryrefslogtreecommitdiff
path: root/Lib/test/test_posix.py
diff options
context:
space:
mode:
authorNed Deily <nad@acm.org>2013-02-02 15:06:45 -0800
committerNed Deily <nad@acm.org>2013-02-02 15:06:45 -0800
commitcc23cc672ff9164900b717bcc7f6484c03328bc0 (patch)
tree90eed043ae4554b71a3552b73bea9b04e67f819d /Lib/test/test_posix.py
parentd66c0ee76ebda143ff838cc62c0356701d5709e5 (diff)
downloadcpython-git-cc23cc672ff9164900b717bcc7f6484c03328bc0.tar.gz
Issue #16698: Skip posix test_getgroups when built with OS X
deployment target prior to 10.6.
Diffstat (limited to 'Lib/test/test_posix.py')
-rw-r--r--Lib/test/test_posix.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py
index 7214efa323..2fba3307d9 100644
--- a/Lib/test/test_posix.py
+++ b/Lib/test/test_posix.py
@@ -452,6 +452,13 @@ class PosixTester(unittest.TestCase):
if ret != None or not groups:
raise unittest.SkipTest("need working 'id -G'")
+ # Issues 16698: OS X ABIs prior to 10.6 have limits on getgroups()
+ if sys.platform == 'darwin':
+ import sysconfig
+ dt = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') or '10.0'
+ if float(dt) < 10.6:
+ raise unittest.SkipTest("getgroups(2) is broken prior to 10.6")
+
# 'id -G' and 'os.getgroups()' should return the same
# groups, ignoring order and duplicates.
# #10822 - it is implementation defined whether posix.getgroups()