summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Deily <nad@acm.org>2011-07-13 15:05:31 -0700
committerNed Deily <nad@acm.org>2011-07-13 15:05:31 -0700
commit0ab67ee79ea6c536168b9ae51af0a85c9b075a40 (patch)
tree88a82f99e7ad0a461b08ab86342e99a72b8ec70a
parentbf547fd3f255430bb32916b9949f1f8e72aee951 (diff)
downloadcpython-git-0ab67ee79ea6c536168b9ae51af0a85c9b075a40.tar.gz
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.
-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 c2b85e6096..069993c369 100644
--- a/Doc/library/platform.rst
+++ b/Doc/library/platform.rst
@@ -233,9 +233,6 @@ Mac OS Platform
Entries which cannot be determined are set to ``''``. All tuple entries are
strings.
- Documentation for the underlying :cfunc:`gestalt` API is available online at
- http://www.rgaros.nl/gestalt/.
-
Unix Platforms
--------------
diff --git a/Lib/platform.py b/Lib/platform.py
index 6db7f19e48..710f21e706 100755
--- a/Lib/platform.py
+++ b/Lib/platform.py
@@ -765,6 +765,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 1ae5888250..941d428c19 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 b282c13aa6..7271ef901e 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -101,6 +101,9 @@ Build
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.