From: Neal Norwitz Date: Tue, 18 Feb 2003 15:22:10 +0000 (+0000) Subject: Fix SF bug #688424, 64-bit test problems X-Git-Tag: v2.3c1~1803 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eb2a5ef36a790ccd3d6943cd75c81fc289fc55c6;p=python Fix SF bug #688424, 64-bit test problems --- diff --git a/Lib/test/test_compile.py b/Lib/test/test_compile.py index 1812fbc3f8..2281b37691 100644 --- a/Lib/test/test_compile.py +++ b/Lib/test/test_compile.py @@ -145,9 +145,14 @@ expect_same("000000000000009.", 9.) # Verify treatment of unary minus on negative numbers SF bug #660455 import warnings warnings.filterwarnings("ignore", "hex/oct constants", FutureWarning) +warnings.filterwarnings("ignore", "hex.* of negative int", FutureWarning) # XXX Of course the following test will have to be changed in Python 2.4 # This test is in a so the filterwarnings() can affect it +import sys +all_one_bits = '0xffffffff' +if sys.maxint != 2147483647: + all_one_bits = '0xffffffffffffffff' exec """ -expect_same("0xffffffff", -1) -expect_same("-0xffffffff", 1) +expect_same(all_one_bits, -1) +expect_same("-" + all_one_bits, 1) """ diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py index f06e934d34..606b8ce020 100644 --- a/Lib/test/test_sys.py +++ b/Lib/test/test_sys.py @@ -173,7 +173,7 @@ class SysModuleTest(unittest.TestCase): def test_getframe(self): self.assertRaises(TypeError, sys._getframe, 42, 42) - self.assertRaises(ValueError, sys._getframe, sys.maxint) + self.assertRaises(ValueError, sys._getframe, 2000000000) self.assert_( SysModuleTest.test_getframe.im_func.func_code \ is sys._getframe().f_code