[Python-checkins] python/dist/src/Lib/test test_compile.py,1.16,1.17 test_sys.py,1.2,1.3
nnorwitz@users.sourceforge.net
nnorwitz@users.sourceforge.net
Tue, 18 Feb 2003 07:22:14 -0800
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv3927/Lib/test
Modified Files:
test_compile.py test_sys.py
Log Message:
Fix SF bug #688424, 64-bit test problems
Index: test_compile.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_compile.py,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** test_compile.py 13 Feb 2003 22:07:55 -0000 1.16
--- test_compile.py 18 Feb 2003 15:22:09 -0000 1.17
***************
*** 146,153 ****
import warnings
warnings.filterwarnings("ignore", "hex/oct constants", FutureWarning)
# 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
exec """
! expect_same("0xffffffff", -1)
! expect_same("-0xffffffff", 1)
"""
--- 146,158 ----
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 <string> so the filterwarnings() can affect it
+ import sys
+ all_one_bits = '0xffffffff'
+ if sys.maxint != 2147483647:
+ all_one_bits = '0xffffffffffffffff'
exec """
! expect_same(all_one_bits, -1)
! expect_same("-" + all_one_bits, 1)
"""
Index: test_sys.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_sys.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** test_sys.py 3 Feb 2003 23:05:27 -0000 1.2
--- test_sys.py 18 Feb 2003 15:22:10 -0000 1.3
***************
*** 174,178 ****
def test_getframe(self):
self.assertRaises(TypeError, sys._getframe, 42, 42)
! self.assertRaises(ValueError, sys._getframe, sys.maxint)
self.assert_(
SysModuleTest.test_getframe.im_func.func_code \
--- 174,178 ----
def test_getframe(self):
self.assertRaises(TypeError, sys._getframe, 42, 42)
! self.assertRaises(ValueError, sys._getframe, 2000000000)
self.assert_(
SysModuleTest.test_getframe.im_func.func_code \