diff options
author | Hirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp> | 2008-10-23 00:38:15 (GMT) |
---|---|---|
committer | Hirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp> | 2008-10-23 00:38:15 (GMT) |
commit | d0d0b65885a25aa3d33502ee9b0e6f26d11f4531 (patch) | |
tree | 9db9f8377d5866533449c30088676dde55e1359a /Lib/test/test_bytes.py | |
parent | ffc9479a41cdacb65937efbc1b60f39f6306c362 (diff) | |
download | cpython-d0d0b65885a25aa3d33502ee9b0e6f26d11f4531.zip cpython-d0d0b65885a25aa3d33502ee9b0e6f26d11f4531.tar.gz cpython-d0d0b65885a25aa3d33502ee9b0e6f26d11f4531.tar.bz2 |
Issue #4183: Some tests didn't run with pickle.HIGHEST_PROTOCOL.
Reviewed by Benjamin Peterson.
Diffstat (limited to 'Lib/test/test_bytes.py')
-rw-r--r-- | Lib/test/test_bytes.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_bytes.py b/Lib/test/test_bytes.py index c368143..c4a3e51 100644 --- a/Lib/test/test_bytes.py +++ b/Lib/test/test_bytes.py @@ -397,7 +397,7 @@ class BaseBytesTest(unittest.TestCase): 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 @@ class ByteArraySubclassTest(unittest.TestCase): 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) |