mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Merged revisions 73715 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k ........ r73715 | benjamin.peterson | 2009-07-01 01:06:06 +0200 (Mi, 01 Jul 2009) | 1 line convert old fail* assertions to assert* ........
This commit is contained in:
parent
ef82be368a
commit
ab91fdef1f
274 changed files with 4538 additions and 4538 deletions
|
@ -52,15 +52,15 @@ class IntTestCases(unittest.TestCase):
|
|||
s = repr(-1-sys.maxsize)
|
||||
x = int(s)
|
||||
self.assertEqual(x+1, -sys.maxsize)
|
||||
self.assert_(isinstance(x, int))
|
||||
self.assertTrue(isinstance(x, int))
|
||||
# should return long
|
||||
self.assertEqual(int(s[1:]), sys.maxsize+1)
|
||||
|
||||
# should return long
|
||||
x = int(1e100)
|
||||
self.assert_(isinstance(x, int))
|
||||
self.assertTrue(isinstance(x, int))
|
||||
x = int(-1e100)
|
||||
self.assert_(isinstance(x, int))
|
||||
self.assertTrue(isinstance(x, int))
|
||||
|
||||
|
||||
# SF bug 434186: 0x80000000/2 != 0x80000000>>1.
|
||||
|
@ -78,7 +78,7 @@ class IntTestCases(unittest.TestCase):
|
|||
self.assertRaises(ValueError, int, '123\x00 245', 20)
|
||||
|
||||
x = int('1' * 600)
|
||||
self.assert_(isinstance(x, int))
|
||||
self.assertTrue(isinstance(x, int))
|
||||
|
||||
self.assertRaises(TypeError, int, 1, 12)
|
||||
|
||||
|
@ -96,8 +96,8 @@ class IntTestCases(unittest.TestCase):
|
|||
self.assertRaises(ValueError, int, "0b", 0)
|
||||
|
||||
# Bug #3236: Return small longs from PyLong_FromString
|
||||
self.assert_(int("10") is 10)
|
||||
self.assert_(int("-1") is -1)
|
||||
self.assertTrue(int("10") is 10)
|
||||
self.assertTrue(int("-1") is -1)
|
||||
|
||||
# SF bug 1334662: int(string, base) wrong answers
|
||||
# Various representations of 2**32 evaluated to 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue