diff options
author | Alexandre Vassalotti <alexandre@peadrop.com> | 2011-12-13 18:22:42 (GMT) |
---|---|---|
committer | Alexandre Vassalotti <alexandre@peadrop.com> | 2011-12-13 18:22:42 (GMT) |
commit | a23d65ccfe3b8f618bf3dde4d0d27895e764367e (patch) | |
tree | d622378b5708429037e47b5759adf76525b502c4 /Lib/test/pickletester.py | |
parent | ec51cf159f2e75d3bdab181877fc28137ce052ba (diff) | |
parent | 3bfc65a25ba2e010ef12db0cff006c2cbbeb18f9 (diff) | |
download | cpython-a23d65ccfe3b8f618bf3dde4d0d27895e764367e.zip cpython-a23d65ccfe3b8f618bf3dde4d0d27895e764367e.tar.gz cpython-a23d65ccfe3b8f618bf3dde4d0d27895e764367e.tar.bz2 |
Merge 3.2
Diffstat (limited to 'Lib/test/pickletester.py')
-rw-r--r-- | Lib/test/pickletester.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Lib/test/pickletester.py b/Lib/test/pickletester.py index 828225d..831306f 100644 --- a/Lib/test/pickletester.py +++ b/Lib/test/pickletester.py @@ -637,9 +637,15 @@ class AbstractPickleTests(unittest.TestCase): def test_bytes(self): for proto in protocols: - for u in b'', b'xyz', b'xyz'*100: - p = self.dumps(u) - self.assertEqual(self.loads(p), u) + for s in b'', b'xyz', b'xyz'*100: + p = self.dumps(s) + self.assertEqual(self.loads(p), s) + for s in [bytes([i]) for i in range(256)]: + p = self.dumps(s) + self.assertEqual(self.loads(p), s) + for s in [bytes([i, i]) for i in range(256)]: + p = self.dumps(s) + self.assertEqual(self.loads(p), s) def test_ints(self): import sys |