diff options
author | Guido van Rossum <guido@python.org> | 2007-07-20 00:22:32 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-07-20 00:22:32 (GMT) |
commit | 99603b0c1edb4b8ca2a30fa90470170b959321ee (patch) | |
tree | f0fef33a9c03529354c01f5fd374fd36ebc024d7 /Lib/test/test_xpickle.py | |
parent | be6fe5476cc3233ac20e02c0063355a5884663f7 (diff) | |
download | cpython-99603b0c1edb4b8ca2a30fa90470170b959321ee.zip cpython-99603b0c1edb4b8ca2a30fa90470170b959321ee.tar.gz cpython-99603b0c1edb4b8ca2a30fa90470170b959321ee.tar.bz2 |
Getting rid of cPickle. Mmm, feels good!
Diffstat (limited to 'Lib/test/test_xpickle.py')
-rw-r--r-- | Lib/test/test_xpickle.py | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/Lib/test/test_xpickle.py b/Lib/test/test_xpickle.py deleted file mode 100644 index 42cd0f4..0000000 --- a/Lib/test/test_xpickle.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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. - -import pickle -import cPickle -import unittest - -from test import test_support -from test.pickletester import AbstractPickleTests - -class DumpCPickle_LoadPickle(AbstractPickleTests): - - error = KeyError - - def dumps(self, arg, proto=0, fast=0): - # Ignore fast - return cPickle.dumps(arg, proto) - - def loads(self, buf): - # Ignore fast - return pickle.loads(buf) - -class DumpPickle_LoadCPickle(AbstractPickleTests): - - error = cPickle.BadPickleGet - - def dumps(self, arg, proto=0, fast=0): - # Ignore fast - return pickle.dumps(arg, proto) - - def loads(self, buf): - # Ignore fast - return cPickle.loads(buf) - -def test_main(): - test_support.run_unittest( - DumpCPickle_LoadPickle, - DumpPickle_LoadCPickle - ) - -if __name__ == "__main__": - test_main() |