Skip to content

Commit

Permalink
Beginning of igh-level tests for pickling.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrish42 committed Aug 19, 2015
1 parent b07f179 commit 006a0cc
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions patsy/test_pickling.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from six.moves import cPickle as pickle

from patsy import EvalFactor

stuff = [
EvalFactor("a+b"),
]

def test_pickling_roundtrips():
for obj in stuff:
assert obj == pickle.loads(pickle.dumps(obj, pickle.HIGHEST_PROTOCOL))

def test_unpickling_future_gives_sensible_error_msg():
pass

# Entrypoint: python -m patsy.test_pickling ...

if __name__ == "__main__":
# TODO Save pickle. Make sure it's running from the right directory, so
# the pickles are saved in the right place.


0 comments on commit 006a0cc

Please sign in to comment.