Staging
v0.8.1
https://github.com/python/cpython
Raw File
Tip revision: d434e9f672961946e8c2cbe603f23dd275546bb2 authored by Barry Warsaw on 07 November 2008, 03:08:42 UTC
De-tagging
Tip revision: d434e9f
test_pickletools.py
import pickle
import pickletools
from test import support
from test.pickletester import AbstractPickleTests
from test.pickletester import AbstractPickleModuleTests

class OptimizedPickleTests(AbstractPickleTests, AbstractPickleModuleTests):

    def dumps(self, arg, proto=None):
        return pickletools.optimize(pickle.dumps(arg, proto))

    def loads(self, buf):
        return pickle.loads(buf)


def test_main():
    support.run_unittest(OptimizedPickleTests)
    support.run_doctest(pickletools)


if __name__ == "__main__":
    test_main()
back to top