From 22af562e30aabf90c8947dd3db4c146805e76ff3 Mon Sep 17 00:00:00 2001 From: Olivier Grisel Date: Thu, 16 Nov 2017 16:23:06 +0100 Subject: [PATCH] FIX ApiModule can be vendored in the pytest package (#135) --- tests/cloudpickle_test.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/cloudpickle_test.py b/tests/cloudpickle_test.py index caa3e66d6..5b1bbcb19 100644 --- a/tests/cloudpickle_test.py +++ b/tests/cloudpickle_test.py @@ -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()