Mercurial > cpython-lru_cache-weakref
diff Lib/test/test_bytes.py @ 49574:bbab11cdb175
Issue #4183: Some tests didn't run with pickle.HIGHEST_PROTOCOL.
Reviewed by Benjamin Peterson.
| author | Hirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp> |
|---|---|
| date | Thu, 23 Oct 2008 00:38:15 +0000 |
| parents | 645fe56c117a |
| children | fdc933951964 |
line wrap: on
line diff
--- a/Lib/test/test_bytes.py Tue Oct 21 21:10:07 2008 +0000 +++ b/Lib/test/test_bytes.py Thu Oct 23 00:38:15 2008 +0000 @@ -397,7 +397,7 @@ self.assertEqual(b.rpartition(b'i'), (b'mississipp', b'i', b'')) def test_pickling(self): - for proto in range(pickle.HIGHEST_PROTOCOL): + for proto in range(pickle.HIGHEST_PROTOCOL + 1): for b in b"", b"a", b"abc", b"\xffab\x80", b"\0\0\377\0\0": b = self.type2test(b) ps = pickle.dumps(b, proto) @@ -979,7 +979,7 @@ a = ByteArraySubclass(b"abcd") a.x = 10 a.y = ByteArraySubclass(b"efgh") - for proto in range(pickle.HIGHEST_PROTOCOL): + for proto in range(pickle.HIGHEST_PROTOCOL + 1): b = pickle.loads(pickle.dumps(a, proto)) self.assertNotEqual(id(a), id(b)) self.assertEqual(a, b)
