mirror of
https://github.com/python/cpython.git
synced 2025-07-31 23:23:11 +00:00
check for toolbox glue before testing platform.mac_ver intensly
This commit is contained in:
parent
6c78f553ae
commit
a4e4ef1cea
1 changed files with 8 additions and 1 deletions
|
@ -65,7 +65,14 @@ class PlatformTest(unittest.TestCase):
|
||||||
def test_mac_ver(self):
|
def test_mac_ver(self):
|
||||||
res = platform.mac_ver()
|
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
|
# We're on a MacOSX system, check that
|
||||||
# the right version information is returned
|
# the right version information is returned
|
||||||
fd = os.popen('sw_vers', 'r')
|
fd = os.popen('sw_vers', 'r')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue