diff options
author | Ronald Oussoren <ronaldoussoren@mac.com> | 2009-12-24 14:50:35 (GMT) |
---|---|---|
committer | Ronald Oussoren <ronaldoussoren@mac.com> | 2009-12-24 14:50:35 (GMT) |
commit | ca8e7ec21676e4e760fef1646b758af040935621 (patch) | |
tree | 637794ab93fd65b57a661a90c5baa27429c5c37f /Lib/distutils/tests | |
parent | b5afe548d4d23d6cff7ab2be259e41cd6017d3c5 (diff) | |
download | cpython-ca8e7ec21676e4e760fef1646b758af040935621.zip cpython-ca8e7ec21676e4e760fef1646b758af040935621.tar.gz cpython-ca8e7ec21676e4e760fef1646b758af040935621.tar.bz2 |
Unittests and news items for the patch in r77026.
Diffstat (limited to 'Lib/distutils/tests')
-rw-r--r-- | Lib/distutils/tests/test_util.py | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/Lib/distutils/tests/test_util.py b/Lib/distutils/tests/test_util.py index 6722997..80c5800 100644 --- a/Lib/distutils/tests/test_util.py +++ b/Lib/distutils/tests/test_util.py @@ -119,6 +119,26 @@ class UtilTestCase(support.EnvironGuard, unittest.TestCase): sys.version = ('2.5 (r25:51918, Sep 19 2006, 08:49:13) ' '\n[GCC 4.0.1 (Apple Computer, Inc. build 5341)]') sys.platform = 'darwin' + + 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') + + maxint = sys.maxint + try: + sys.maxint = 2147483647 + self.assertEquals(get_platform(), 'macosx-10.3-ppc') + sys.maxint = 9223372036854775807 + self.assertEquals(get_platform(), 'macosx-10.3-ppc64') + finally: + sys.maxint = maxint + + self._set_uname(('Darwin', 'macziade', '8.11.1', ('Darwin Kernel Version 8.11.1: ' 'Wed Oct 10 18:23:28 PDT 2007; ' @@ -128,7 +148,15 @@ class UtilTestCase(support.EnvironGuard, unittest.TestCase): get_config_vars()['CFLAGS'] = ('-fno-strict-aliasing -DNDEBUG -g ' '-fwrapv -O3 -Wall -Wstrict-prototypes') - self.assertEquals(get_platform(), 'macosx-10.3-i386') + maxint = sys.maxint + try: + sys.maxint = 2147483647 + self.assertEquals(get_platform(), 'macosx-10.3-i386') + sys.maxint = 9223372036854775807 + self.assertEquals(get_platform(), 'macosx-10.3-x86_64') + finally: + sys.maxint = maxint + # macbook with fat binaries (fat, universal or fat64) os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.4' @@ -173,6 +201,7 @@ class UtilTestCase(support.EnvironGuard, unittest.TestCase): self.assertEquals(get_platform(), 'macosx-10.4-%s'%(arch,)) + # linux debian sarge os.name = 'posix' sys.version = ('2.3.5 (#1, Jul 4 2007, 17:28:59) ' |