summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Deily <nad@acm.org>2011-07-13 15:09:49 -0700
committerNed Deily <nad@acm.org>2011-07-13 15:09:49 -0700
commit07b353716cb10a057eda7fb171b25dce6e14e1a2 (patch)
tree7a217ceb9092b3ff74494b45a20dedb81ee1bc7e
parentcb41cda8e302279821433d862dfe80af8eea4597 (diff)
parent58e3350bd48d59c273e320c408f2546e6d09146e (diff)
downloadcpython-git-07b353716cb10a057eda7fb171b25dce6e14e1a2.tar.gz
Issue #12549: Correct test_platform to not fail when OS X returns 'x86_64'
as the processor type on some Mac systems.
-rw-r--r--Doc/library/platform.rst3
-rwxr-xr-xLib/platform.py1
-rw-r--r--Lib/test/test_platform.py2
-rw-r--r--Misc/NEWS3
4 files changed, 5 insertions, 4 deletions
diff --git a/Doc/library/platform.rst b/Doc/library/platform.rst
index 5928c5fb98..ce079cf42c 100644
--- a/Doc/library/platform.rst
+++ b/Doc/library/platform.rst
@@ -232,9 +232,6 @@ Mac OS Platform
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 e2a74fe13c..0cb0a4fc43 100755
--- a/Lib/platform.py
+++ b/Lib/platform.py
@@ -679,6 +679,7 @@ def _mac_ver_gestalt():
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 93f86d90f1..cfe623a867 100644
--- a/Lib/test/test_platform.py
+++ b/Lib/test/test_platform.py
@@ -191,7 +191,7 @@ class PlatformTest(unittest.TestCase):
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 be49249bbb..a206a17f12 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -1020,6 +1020,9 @@ Extension Modules
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.