Commits

dan mackinlay committed 33fa0a2

testing for graceful seialization

  • Participants
  • Parent commits ddac599

Comments (0)

Files changed (2)

 from setuptools import setup, find_packages
 import sys, os
 
-version = '0.1'
+version = '0.1.1'
 
 setup(name='fsdict',
       version=version,

File tests/fsdict_tests.py

 from nose.tools import nottest, assert_equal, assert_true, assert_false
 from fsdict import FSDict
 
+def test_fsdict_pickles():
+    """I pass these in to multiprocessing, so I need them to
+    serialize properly
+    """
+    import cPickle
+    d1 = FSDict({'a':'b'})
+    d2 = cPickle.loads(cPickle.dumps(d1))
+    yield assert_equal, d1, d2
+    yield assert_equal, d1.work_dir, d2.work_dir
+    
+
 def test_fsdict_loads():
     import pickle