Helper function to test whether object pickled with cloudpickle can be depickled with pickle
(obj, protocol=cloudpickle.DEFAULT_PROTOCOL)
| 68 | |
| 69 | |
| 70 | def pickle_depickle(obj, protocol=cloudpickle.DEFAULT_PROTOCOL): |
| 71 | """Helper function to test whether object pickled with cloudpickle can be |
| 72 | depickled with pickle |
| 73 | """ |
| 74 | return pickle.loads(cloudpickle.dumps(obj, protocol=protocol)) |
| 75 | |
| 76 | |
| 77 | def _escape(raw_filepath): |
no outgoing calls
no test coverage detected