Issue #12549: Correct test_platform to not fail when OS X returns 'x86_64'

as the processor type on some Mac systems.
This commit is contained in:
Ned Deily 2011-07-13 15:09:49 -07:00
commit 07b353716c
4 changed files with 5 additions and 4 deletions

View file

@ -232,9 +232,6 @@ Mac OS Platform
Entries which cannot be determined are set to ``''``. All tuple entries are Entries which cannot be determined are set to ``''``. All tuple entries are
strings. strings.
Documentation for the underlying :c:func:`gestalt` API is available online at
http://www.rgaros.nl/gestalt/.
Unix Platforms Unix Platforms
-------------- --------------

View file

@ -679,6 +679,7 @@ def _mac_ver_gestalt():
0x2: 'PowerPC', 0x2: 'PowerPC',
0xa: 'i386'}.get(sysa,'') 0xa: 'i386'}.get(sysa,'')
versioninfo=('', '', '')
return release,versioninfo,machine return release,versioninfo,machine
def _mac_ver_xml(): def _mac_ver_xml():

View file

@ -191,7 +191,7 @@ class PlatformTest(unittest.TestCase):
self.assertEqual(res[1], ('', '', '')) self.assertEqual(res[1], ('', '', ''))
if sys.byteorder == 'little': if sys.byteorder == 'little':
self.assertEqual(res[2], 'i386') self.assertIn(res[2], ('i386', 'x86_64'))
else: else:
self.assertEqual(res[2], 'PowerPC') self.assertEqual(res[2], 'PowerPC')

View file

@ -1020,6 +1020,9 @@ Extension Modules
Tests Tests
----- -----
- Issue #12549: Correct test_platform to not fail when OS X returns 'x86_64'
as the processor type on some Mac systems.
- Skip network tests when getaddrinfo() returns EAI_AGAIN, meaning a temporary - Skip network tests when getaddrinfo() returns EAI_AGAIN, meaning a temporary
failure in name resolution. failure in name resolution.