mirror of
https://github.com/python/cpython.git
synced 2025-10-13 18:33:34 +00:00
#9424: Replace deprecated assert* methods in the Python test suite.
This commit is contained in:
parent
b8bc439b20
commit
b3aedd4862
170 changed files with 2388 additions and 2392 deletions
|
@ -238,9 +238,9 @@ class BaseTest(unittest.TestCase):
|
|||
def test_reduce_ex(self):
|
||||
a = array.array(self.typecode, self.example)
|
||||
for protocol in range(3):
|
||||
self.assert_(a.__reduce_ex__(protocol)[0] is array.array)
|
||||
self.assertIs(a.__reduce_ex__(protocol)[0], array.array)
|
||||
for protocol in range(3, pickle.HIGHEST_PROTOCOL):
|
||||
self.assert_(a.__reduce_ex__(protocol)[0] is array_reconstructor)
|
||||
self.assertIs(a.__reduce_ex__(protocol)[0], array_reconstructor)
|
||||
|
||||
def test_pickle(self):
|
||||
for protocol in range(pickle.HIGHEST_PROTOCOL + 1):
|
||||
|
@ -785,11 +785,11 @@ class BaseTest(unittest.TestCase):
|
|||
data.reverse()
|
||||
L[start:stop:step] = data
|
||||
a[start:stop:step] = array.array(self.typecode, data)
|
||||
self.assertEquals(a, array.array(self.typecode, L))
|
||||
self.assertEqual(a, array.array(self.typecode, L))
|
||||
|
||||
del L[start:stop:step]
|
||||
del a[start:stop:step]
|
||||
self.assertEquals(a, array.array(self.typecode, L))
|
||||
self.assertEqual(a, array.array(self.typecode, L))
|
||||
|
||||
def test_index(self):
|
||||
example = 2*self.example
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue