# test_pickle dumps and loads pickles via pickle.py.
# test_cpickle does the same, but via the cPickle module.
# This test covers the other two cases, making pickles with one module and
# loading them via the other.
from test
import test_support
from test
.pickletester
import AbstractPickleTests
class DumpCPickle_LoadPickle(AbstractPickleTests
):
def dumps(self
, arg
, proto
=0, fast
=0):
return cPickle
.dumps(arg
, proto
)
class DumpPickle_LoadCPickle(AbstractPickleTests
):
error
= cPickle
.BadPickleGet
def dumps(self
, arg
, proto
=0, fast
=0):
return pickle
.dumps(arg
, proto
)
return cPickle
.loads(buf
)
test_support
.run_unittest(
if __name__
== "__main__":