diff options
author | Benjamin Peterson <benjamin@python.org> | 2008-05-21 22:52:39 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2008-05-21 22:52:39 (GMT) |
commit | a4e4ef1cea957795b45e9956a6fc6eec76ceebaf (patch) | |
tree | 0cfb60dd67be5b4ee323261b1d7e723bd7b1f145 /Lib | |
parent | 6c78f553aec38b0447bc9958feacf40617fc403b (diff) | |
download | cpython-a4e4ef1cea957795b45e9956a6fc6eec76ceebaf.zip cpython-a4e4ef1cea957795b45e9956a6fc6eec76ceebaf.tar.gz cpython-a4e4ef1cea957795b45e9956a6fc6eec76ceebaf.tar.bz2 |
check for toolbox glue before testing platform.mac_ver intensly
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_platform.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Lib/test/test_platform.py b/Lib/test/test_platform.py index 6275a6a..a19556d 100644 --- a/Lib/test/test_platform.py +++ b/Lib/test/test_platform.py @@ -65,7 +65,14 @@ class PlatformTest(unittest.TestCase): 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') |