We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3bc08d6 commit d5ed045Copy full SHA for d5ed045
patsy/test_pickling.py
@@ -0,0 +1,22 @@
1
+from six.moves import cPickle as pickle
2
+
3
+from patsy import EvalFactor
4
5
+stuff = [
6
+ EvalFactor("a+b"),
7
+ ]
8
9
+def test_pickling_roundtrips():
10
+ for obj in stuff:
11
+ assert obj == pickle.loads(pickle.dumps(obj, pickle.HIGHEST_PROTOCOL))
12
13
+def test_unpickling_future_gives_sensible_error_msg():
14
+ pass
15
16
+# Entrypoint: python -m patsy.test_pickling ...
17
18
+if __name__ == "__main__":
19
+ # TODO Save pickle. Make sure it's running from the right directory, so
20
+ # the pickles are saved in the right place.
21
22
0 commit comments