Skip to content

Commit

Permalink
FIX ApiModule can be vendored in the pytest package (cloudpipe#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
ogrisel authored and rgbkrk committed Feb 5, 2018
1 parent dac351a commit 22af562
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/cloudpickle_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -690,10 +690,10 @@ def f():
s = py.builtin.set([1])
return s.pop()

# some setup is required to allow pytest apimodules to be correctly serializable.
# some setup is required to allow pytest apimodules to be correctly
# serializable.
from cloudpickle import CloudPickler
from py._apipkg import ApiModule
CloudPickler.dispatch[ApiModule] = CloudPickler.save_module
CloudPickler.dispatch[type(py.builtin)] = CloudPickler.save_module
g = cloudpickle.loads(cloudpickle.dumps(f))

result = g()
Expand Down

0 comments on commit 22af562

Please sign in to comment.