Sha256: d06e68e548887daf6e8d5dc69539d53d78666efc987598c518795ffff16be19b

Contents?: true

Size: 967 Bytes

Versions: 30

Compression:

Stored size: 967 Bytes

Contents

import pickle
import test_support
import unittest
from cStringIO import StringIO
from pickletester import AbstractPickleTests, AbstractPickleModuleTests

class PickleTests(AbstractPickleTests, AbstractPickleModuleTests):

    def setUp(self):
        self.dumps = pickle.dumps
        self.loads = pickle.loads

    module = pickle
    error = KeyError

class PicklerTests(AbstractPickleTests):

    error = KeyError

    def dumps(self, arg, bin=0):
        f = StringIO()
        p = pickle.Pickler(f, bin)
        p.dump(arg)
        f.seek(0)
        return f.read()

    def loads(self, buf):
        f = StringIO(buf)
        u = pickle.Unpickler(f)
        return u.load()

def test_main():
    loader = unittest.TestLoader()
    suite = unittest.TestSuite()
    suite.addTest(loader.loadTestsFromTestCase(PickleTests))
    suite.addTest(loader.loadTestsFromTestCase(PicklerTests))
    test_support.run_suite(suite)

if __name__ == "__main__":
    test_main()

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
rubyfox-server-2.19.2.0 lib/rubyfox/server/data/lib/Lib/test/test_pickle.py
rubyfox-server-2.17.3.2 lib/rubyfox/server/data/lib/Lib/test/test_pickle.py
rubyfox-server-2.17.3.1 lib/rubyfox/server/data/lib/Lib/test/test_pickle.py
rubyfox-server-2.17.3.0 lib/rubyfox/server/data/lib/Lib/test/test_pickle.py
rubyfox-server-2.16.3.2 lib/rubyfox/server/data/lib/Lib/test/test_pickle.py
rubyfox-server-2.16.3.1 lib/rubyfox/server/data/lib/Lib/test/test_pickle.py
rubyfox-server-2.16.0.4 lib/rubyfox/server/data/lib/Lib/test/test_pickle.py
rubyfox-server-2.16.0.3 lib/rubyfox/server/data/lib/Lib/test/test_pickle.py
rubyfox-server-2.16.0.2 lib/rubyfox/server/data/lib/Lib/test/test_pickle.py
rubyfox-server-2.16.0.1 lib/rubyfox/server/data/lib/Lib/test/test_pickle.py
rubyfox-server-2.16.0.0 lib/rubyfox/server/data/lib/Lib/test/test_pickle.py
rubyfox-server-2.13.7.3 lib/rubyfox/server/data/lib/Lib/test/test_pickle.py
rubyfox-server-2.13.6.2 lib/rubyfox/server/data/lib/Lib/test/test_pickle.py
rubyfox-server-2.13.6.1 lib/rubyfox/server/data/lib/Lib/test/test_pickle.py
rubyfox-server-2.13.5.1 lib/rubyfox/server/data/lib/Lib/test/test_pickle.py
rubyfox-server-2.13.4.1 lib/rubyfox/server/data/lib/Lib/test/test_pickle.py
rubyfox-server-2.13.3.1 lib/rubyfox/server/data/lib/Lib/test/test_pickle.py
rubyfox-server-2.12.5.1 lib/rubyfox/server/data/lib/Lib/test/test_pickle.py
rubyfox-server-2.12.5.0 lib/rubyfox/server/data/lib/Lib/test/test_pickle.py
rubyfox-server-2.12.4.0 lib/rubyfox/server/data/lib/Lib/test/test_pickle.py