Issue #12549: Correct test_platform to not fail when OS X returns 'x86_64'
as the processor type on some Mac systems.
diff --git a/Doc/library/platform.rst b/Doc/library/platform.rst
index 5928c5f..ce079cf 100644
--- a/Doc/library/platform.rst
+++ b/Doc/library/platform.rst
@@ -232,9 +232,6 @@
Entries which cannot be determined are set to ``''``. All tuple entries are
strings.
- Documentation for the underlying :c:func:`gestalt` API is available online at
- http://www.rgaros.nl/gestalt/.
-
Unix Platforms
--------------
diff --git a/Lib/platform.py b/Lib/platform.py
index e2a74fe..0cb0a4f 100755
--- a/Lib/platform.py
+++ b/Lib/platform.py
@@ -679,6 +679,7 @@
0x2: 'PowerPC',
0xa: 'i386'}.get(sysa,'')
+ versioninfo=('', '', '')
return release,versioninfo,machine
def _mac_ver_xml():
diff --git a/Lib/test/test_platform.py b/Lib/test/test_platform.py
index 93f86d9..cfe623a 100644
--- a/Lib/test/test_platform.py
+++ b/Lib/test/test_platform.py
@@ -191,7 +191,7 @@
self.assertEqual(res[1], ('', '', ''))
if sys.byteorder == 'little':
- self.assertEqual(res[2], 'i386')
+ self.assertIn(res[2], ('i386', 'x86_64'))
else:
self.assertEqual(res[2], 'PowerPC')
diff --git a/Misc/NEWS b/Misc/NEWS
index be49249..a206a17 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -1020,6 +1020,9 @@
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
failure in name resolution.