summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_sysconfig.py
diff options
context:
space:
mode:
authorTarek Ziadé <ziade.tarek@gmail.com>2010-01-29 11:46:31 (GMT)
committerTarek Ziadé <ziade.tarek@gmail.com>2010-01-29 11:46:31 (GMT)
commit8b441d0dcdb9380e999f0caead087c4365cb0bdd (patch)
tree6afac21467fdfacecb62658f96fc847aace4731b /Lib/test/test_sysconfig.py
parentedacea30e457e151611a9fe560120cedb3bdc527 (diff)
downloadcpython-8b441d0dcdb9380e999f0caead087c4365cb0bdd.zip
cpython-8b441d0dcdb9380e999f0caead087c4365cb0bdd.tar.gz
cpython-8b441d0dcdb9380e999f0caead087c4365cb0bdd.tar.bz2
Merged revisions 77759,77761 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r77759 | tarek.ziade | 2010-01-26 22:21:54 +0100 (Tue, 26 Jan 2010) | 1 line reintroduced the names in Distutils for APIs that were relocated ........ r77761 | tarek.ziade | 2010-01-26 23:46:15 +0100 (Tue, 26 Jan 2010) | 1 line added local get_platform/set_platform APIs in distutils.sysconfig ........
Diffstat (limited to 'Lib/test/test_sysconfig.py')
-rw-r--r--Lib/test/test_sysconfig.py28
1 files changed, 27 insertions, 1 deletions
diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py
index c451b74..8222aaf 100644
--- a/Lib/test/test_sysconfig.py
+++ b/Lib/test/test_sysconfig.py
@@ -138,6 +138,25 @@ class TestSysConfig(unittest.TestCase):
self._set_uname(('Darwin', 'macziade', '8.11.1',
('Darwin Kernel Version 8.11.1: '
'Wed Oct 10 18:23:28 PDT 2007; '
+ 'root:xnu-792.25.20~1/RELEASE_I386'), 'PowerPC'))
+ os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.3'
+
+ get_config_vars()['CFLAGS'] = ('-fno-strict-aliasing -DNDEBUG -g '
+ '-fwrapv -O3 -Wall -Wstrict-prototypes')
+
+ maxsize = sys.maxsize
+ try:
+ sys.maxsize = 2147483647
+ self.assertEquals(get_platform(), 'macosx-10.3-ppc')
+ sys.maxsize = 9223372036854775807
+ self.assertEquals(get_platform(), 'macosx-10.3-ppc64')
+ finally:
+ sys.maxsize = maxsize
+
+
+ self._set_uname(('Darwin', 'macziade', '8.11.1',
+ ('Darwin Kernel Version 8.11.1: '
+ 'Wed Oct 10 18:23:28 PDT 2007; '
'root:xnu-792.25.20~1/RELEASE_I386'), 'i386'))
get_config_vars()['MACOSX_DEPLOYMENT_TARGET'] = '10.3'
os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.3'
@@ -145,7 +164,14 @@ class TestSysConfig(unittest.TestCase):
get_config_vars()['CFLAGS'] = ('-fno-strict-aliasing -DNDEBUG -g '
'-fwrapv -O3 -Wall -Wstrict-prototypes')
- self.assertEquals(get_platform(), 'macosx-10.3-i386')
+ maxsize = sys.maxsize
+ try:
+ sys.maxsize = 2147483647
+ self.assertEquals(get_platform(), 'macosx-10.3-i386')
+ sys.maxsize = 9223372036854775807
+ self.assertEquals(get_platform(), 'macosx-10.3-x86_64')
+ finally:
+ sys.maxsize = maxsize
# macbook with fat binaries (fat, universal or fat64)
os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.4'