diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2013-03-04 13:21:14 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2013-03-04 13:21:14 (GMT) |
commit | 63f40d7af442e8d1fbb50ca0f8c5faf815f5ccbb (patch) | |
tree | bed0f19fba070a5a22147d9de5cf94122ff31f2e /Lib | |
parent | bb5f48008db4572b370bdf02674c33d3c2efad3a (diff) | |
parent | 296069301ac51d95fe5e30b4abf518940f10346d (diff) | |
download | cpython-63f40d7af442e8d1fbb50ca0f8c5faf815f5ccbb.zip cpython-63f40d7af442e8d1fbb50ca0f8c5faf815f5ccbb.tar.gz cpython-63f40d7af442e8d1fbb50ca0f8c5faf815f5ccbb.tar.bz2 |
#17346: merge with 3.3.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/pickletester.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/pickletester.py b/Lib/test/pickletester.py index fb04830..5d12375 100644 --- a/Lib/test/pickletester.py +++ b/Lib/test/pickletester.py @@ -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): |