mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
Getting rid of cPickle. Mmm, feels good!
This commit is contained in:
parent
be6fe5476c
commit
99603b0c1e
22 changed files with 38 additions and 5846 deletions
|
@ -4,7 +4,6 @@ import os
|
|||
import re
|
||||
import sys
|
||||
import pickle
|
||||
import cPickle
|
||||
import tempfile
|
||||
import unittest
|
||||
import test.test_support
|
||||
|
@ -641,12 +640,11 @@ class BytesTest(unittest.TestCase):
|
|||
self.assertEqual(b.rpartition(b'i'), (b'mississipp', b'i', b''))
|
||||
|
||||
def test_pickling(self):
|
||||
for pm in pickle, cPickle:
|
||||
for proto in range(pm.HIGHEST_PROTOCOL):
|
||||
for b in b"", b"a", b"abc", b"\xffab\x80", b"\0\0\377\0\0":
|
||||
ps = pm.dumps(b, proto)
|
||||
q = pm.loads(ps)
|
||||
self.assertEqual(b, q)
|
||||
for proto in range(pickle.HIGHEST_PROTOCOL):
|
||||
for b in b"", b"a", b"abc", b"\xffab\x80", b"\0\0\377\0\0":
|
||||
ps = pickle.dumps(b, proto)
|
||||
q = pickle.loads(ps)
|
||||
self.assertEqual(b, q)
|
||||
|
||||
def test_strip(self):
|
||||
b = b'mississippi'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue