mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Issue #12549: Correct test_platform to not fail when OS X returns 'x86_64'
as the processor type on some Mac systems. Also fix NameError in fallback _mac_ver_gestalt function. And remove out-of-date URL in docs.
This commit is contained in:
parent
6636121950
commit
58e3350bd4
4 changed files with 5 additions and 4 deletions
|
@ -228,9 +228,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
|
||||||
--------------
|
--------------
|
||||||
|
|
|
@ -758,6 +758,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():
|
||||||
|
|
|
@ -194,7 +194,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')
|
||||||
|
|
||||||
|
|
|
@ -56,6 +56,9 @@ C-API
|
||||||
Tests
|
Tests
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
- Issue #12549: Correct test_platform to not fail when OS X returns 'x86_64'
|
||||||
|
as the processor type on some Mac systems.
|
||||||
|
|
||||||
- Avoid failing in test_robotparser when mueblesmoraleda.com is flaky and
|
- Avoid failing in test_robotparser when mueblesmoraleda.com is flaky and
|
||||||
an overzealous DNS service (e.g. OpenDNS) redirects to a placeholder
|
an overzealous DNS service (e.g. OpenDNS) redirects to a placeholder
|
||||||
Web site.
|
Web site.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue