diff options
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test__osx_support.py | 4 | ||||
-rw-r--r-- | Lib/test/test_posix.py | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test__osx_support.py b/Lib/test/test__osx_support.py index fb159ecf41..5dcadf7a40 100644 --- a/Lib/test/test__osx_support.py +++ b/Lib/test/test__osx_support.py @@ -109,7 +109,9 @@ class Test_OSXSupport(unittest.TestCase): def test__supports_universal_builds(self): import platform - self.assertEqual(platform.mac_ver()[0].split('.') >= ['10', '4'], + mac_ver_tuple = tuple(int(i) for i in + platform.mac_ver()[0].split('.')[0:2]) + self.assertEqual(mac_ver_tuple >= (10, 4), _osx_support._supports_universal_builds()) def test__find_appropriate_compiler(self): diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py index 9a5ee91f66..fdf5948d10 100644 --- a/Lib/test/test_posix.py +++ b/Lib/test/test_posix.py @@ -768,7 +768,7 @@ class PosixTester(unittest.TestCase): if sys.platform == 'darwin': import sysconfig dt = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') or '10.0' - if float(dt) < 10.6: + if tuple(int(n) for n in dt.split('.')[0:2]) < (10, 6): raise unittest.SkipTest("getgroups(2) is broken prior to 10.6") # 'id -G' and 'os.getgroups()' should return the same |