mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Fix SF bug #688424, 64-bit test problems
This commit is contained in:
parent
4edaa0d516
commit
eb2a5ef36a
2 changed files with 8 additions and 3 deletions
|
@ -145,9 +145,14 @@ expect_same("000000000000009.", 9.)
|
||||||
# Verify treatment of unary minus on negative numbers SF bug #660455
|
# Verify treatment of unary minus on negative numbers SF bug #660455
|
||||||
import warnings
|
import warnings
|
||||||
warnings.filterwarnings("ignore", "hex/oct constants", FutureWarning)
|
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
|
# XXX Of course the following test will have to be changed in Python 2.4
|
||||||
# This test is in a <string> so the filterwarnings() can affect it
|
# This test is in a <string> so the filterwarnings() can affect it
|
||||||
|
import sys
|
||||||
|
all_one_bits = '0xffffffff'
|
||||||
|
if sys.maxint != 2147483647:
|
||||||
|
all_one_bits = '0xffffffffffffffff'
|
||||||
exec """
|
exec """
|
||||||
expect_same("0xffffffff", -1)
|
expect_same(all_one_bits, -1)
|
||||||
expect_same("-0xffffffff", 1)
|
expect_same("-" + all_one_bits, 1)
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -173,7 +173,7 @@ class SysModuleTest(unittest.TestCase):
|
||||||
|
|
||||||
def test_getframe(self):
|
def test_getframe(self):
|
||||||
self.assertRaises(TypeError, sys._getframe, 42, 42)
|
self.assertRaises(TypeError, sys._getframe, 42, 42)
|
||||||
self.assertRaises(ValueError, sys._getframe, sys.maxint)
|
self.assertRaises(ValueError, sys._getframe, 2000000000)
|
||||||
self.assert_(
|
self.assert_(
|
||||||
SysModuleTest.test_getframe.im_func.func_code \
|
SysModuleTest.test_getframe.im_func.func_code \
|
||||||
is sys._getframe().f_code
|
is sys._getframe().f_code
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue