#17346: merge with 3.2.
This commit is contained in:
commit
296069301a
|
@ -578,10 +578,10 @@ class AbstractPickleTests(unittest.TestCase):
|
|||
i = C()
|
||||
i.attr = i
|
||||
for proto in protocols:
|
||||
s = self.dumps(i, 2)
|
||||
s = self.dumps(i, proto)
|
||||
x = self.loads(s)
|
||||
self.assertEqual(dir(x), dir(i))
|
||||
self.assertTrue(x.attr is x)
|
||||
self.assertIs(x.attr, x)
|
||||
|
||||
def test_recursive_multi(self):
|
||||
l = []
|
||||
|
@ -638,13 +638,13 @@ class AbstractPickleTests(unittest.TestCase):
|
|||
def test_bytes(self):
|
||||
for proto in protocols:
|
||||
for s in b'', b'xyz', b'xyz'*100:
|
||||
p = self.dumps(s)
|
||||
p = self.dumps(s, proto)
|
||||
self.assertEqual(self.loads(p), s)
|
||||
for s in [bytes([i]) for i in range(256)]:
|
||||
p = self.dumps(s)
|
||||
p = self.dumps(s, proto)
|
||||
self.assertEqual(self.loads(p), s)
|
||||
for s in [bytes([i, i]) for i in range(256)]:
|
||||
p = self.dumps(s)
|
||||
p = self.dumps(s, proto)
|
||||
self.assertEqual(self.loads(p), s)
|
||||
|
||||
def test_ints(self):
|
||||
|
|
Loading…
Reference in New Issue