mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Merged revisions 86596 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86596 | ezio.melotti | 2010-11-20 21:04:17 +0200 (Sat, 20 Nov 2010) | 1 line #9424: Replace deprecated assert* methods in the Python test suite. ........
This commit is contained in:
parent
b65b4937e2
commit
19f2aeba67
164 changed files with 2281 additions and 2279 deletions
|
@ -551,15 +551,15 @@ class BuiltinTest(unittest.TestCase):
|
|||
class X:
|
||||
def __hash__(self):
|
||||
return 2**100
|
||||
self.assertEquals(type(hash(X())), int)
|
||||
self.assertEqual(type(hash(X())), int)
|
||||
class Y(object):
|
||||
def __hash__(self):
|
||||
return 2**100
|
||||
self.assertEquals(type(hash(Y())), int)
|
||||
self.assertEqual(type(hash(Y())), int)
|
||||
class Z(int):
|
||||
def __hash__(self):
|
||||
return self
|
||||
self.assertEquals(hash(Z(42)), hash(42))
|
||||
self.assertEqual(hash(Z(42)), hash(42))
|
||||
|
||||
def test_hex(self):
|
||||
self.assertEqual(hex(16), '0x10')
|
||||
|
@ -791,7 +791,7 @@ class BuiltinTest(unittest.TestCase):
|
|||
self.assertEqual(next(it), 1)
|
||||
self.assertRaises(StopIteration, next, it)
|
||||
self.assertRaises(StopIteration, next, it)
|
||||
self.assertEquals(next(it, 42), 42)
|
||||
self.assertEqual(next(it, 42), 42)
|
||||
|
||||
class Iter(object):
|
||||
def __iter__(self):
|
||||
|
@ -800,7 +800,7 @@ class BuiltinTest(unittest.TestCase):
|
|||
raise StopIteration
|
||||
|
||||
it = iter(Iter())
|
||||
self.assertEquals(next(it, 42), 42)
|
||||
self.assertEqual(next(it, 42), 42)
|
||||
self.assertRaises(StopIteration, next, it)
|
||||
|
||||
def gen():
|
||||
|
@ -808,9 +808,9 @@ class BuiltinTest(unittest.TestCase):
|
|||
return
|
||||
|
||||
it = gen()
|
||||
self.assertEquals(next(it), 1)
|
||||
self.assertEqual(next(it), 1)
|
||||
self.assertRaises(StopIteration, next, it)
|
||||
self.assertEquals(next(it, 42), 42)
|
||||
self.assertEqual(next(it, 42), 42)
|
||||
|
||||
def test_oct(self):
|
||||
self.assertEqual(oct(100), '0o144')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue