[Python-checkins] r63528 - python/trunk/Lib/test/test_platform.py
benjamin.peterson
python-checkins at python.org
Thu May 22 00:52:39 CEST 2008
Author: benjamin.peterson
Date: Thu May 22 00:52:39 2008
New Revision: 63528
Log:
check for toolbox glue before testing platform.mac_ver intensly
Modified:
python/trunk/Lib/test/test_platform.py
Modified: python/trunk/Lib/test/test_platform.py
==============================================================================
--- python/trunk/Lib/test/test_platform.py (original)
+++ python/trunk/Lib/test/test_platform.py Thu May 22 00:52:39 2008
@@ -65,7 +65,14 @@
def test_mac_ver(self):
res = platform.mac_ver()
- if os.uname()[0] == 'Darwin':
+ try:
+ import gestalt
+ except ImportError:
+ have_toolbox_glue = False
+ else:
+ have_toolbox_glue = True
+
+ if have_toolbox_glue and os.uname()[0] == 'Darwin':
# We're on a MacOSX system, check that
# the right version information is returned
fd = os.popen('sw_vers', 'r')
More information about the Python-checkins
mailing list