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

Skip to content

Commit 07b3537

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.
2 parents cb41cda + 58e3350 commit 07b3537

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
@@ -232,9 +232,6 @@ Mac OS Platform
232232
Entries which cannot be determined are set to ``''``. All tuple entries are
233233
strings.
234234

235-
Documentation for the underlying :c:func:`gestalt` API is available online at
236-
http://www.rgaros.nl/gestalt/.
237-
238235

239236
Unix Platforms
240237
--------------

Lib/platform.py

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

682+
versioninfo=('', '', '')
682683
return release,versioninfo,machine
683684

684685
def _mac_ver_xml():

Lib/test/test_platform.py

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

193193
if sys.byteorder == 'little':
194-
self.assertEqual(res[2], 'i386')
194+
self.assertIn(res[2], ('i386', 'x86_64'))
195195
else:
196196
self.assertEqual(res[2], 'PowerPC')
197197

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,6 +1020,9 @@ Extension Modules
10201020
Tests
10211021
-----
10221022

1023+
- Issue #12549: Correct test_platform to not fail when OS X returns 'x86_64'
1024+
as the processor type on some Mac systems.
1025+
10231026
- Skip network tests when getaddrinfo() returns EAI_AGAIN, meaning a temporary
10241027
failure in name resolution.
10251028

0 commit comments

Comments
 (0)