Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 58e3350

Browse files
committed
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.
1 parent 6636121 commit 58e3350

4 files changed

Lines changed: 5 additions & 4 deletions

File tree

Doc/library/platform.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,6 @@ Mac OS Platform
228228
Entries which cannot be determined are set to ``''``. All tuple entries are
229229
strings.
230230

231-
Documentation for the underlying :c:func:`gestalt` API is available online at
232-
http://www.rgaros.nl/gestalt/.
233-
234231

235232
Unix Platforms
236233
--------------

Lib/platform.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,7 @@ def _mac_ver_gestalt():
758758
0x2: 'PowerPC',
759759
0xa: 'i386'}.get(sysa,'')
760760

761+
versioninfo=('', '', '')
761762
return release,versioninfo,machine
762763

763764
def _mac_ver_xml():

Lib/test/test_platform.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def test_mac_ver(self):
194194
self.assertEqual(res[1], ('', '', ''))
195195

196196
if sys.byteorder == 'little':
197-
self.assertEqual(res[2], 'i386')
197+
self.assertIn(res[2], ('i386', 'x86_64'))
198198
else:
199199
self.assertEqual(res[2], 'PowerPC')
200200

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ C-API
5656
Tests
5757
-----
5858

59+
- Issue #12549: Correct test_platform to not fail when OS X returns 'x86_64'
60+
as the processor type on some Mac systems.
61+
5962
- Avoid failing in test_robotparser when mueblesmoraleda.com is flaky and
6063
an overzealous DNS service (e.g. OpenDNS) redirects to a placeholder
6164
Web site.

0 commit comments

Comments
 (0)