# HG changeset patch # Parent 5bf91dfb1e34615616a58a28f0cc5660cb89e292 Issue #16698: Skip some posix groups tests when built with OS X deployment target prior to 10.6. diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py --- a/Lib/test/test_posix.py +++ b/Lib/test/test_posix.py @@ -452,6 +452,13 @@ 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()