-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Beginning of igh-level tests for pickling.
- Loading branch information
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
|
||
|