Skip to content

Commit ab8f56d

Browse files
committed
Add patch pickleability unit test
1 parent 2fd3a61 commit ab8f56d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Diff for: tests/unit/test_patch.py

+11
Original file line numberDiff line numberDiff line change
@@ -244,3 +244,14 @@ def test_pat019_patch_remove():
244244
"location": [],
245245
"params": {"value": "item"},
246246
}
247+
248+
249+
def test_pat020_patch_pickle():
250+
import pickle
251+
252+
p = Patch()
253+
p["a"] = "a"
254+
data = pickle.dumps(p)
255+
q = pickle.loads(data)
256+
257+
assert patch_to_dict(p) == patch_to_dict(q)

0 commit comments

Comments
 (0)