MCPcopy
hub / github.com/celery/celery / test_no_cpickle

Method test_no_cpickle

t/unit/utils/test_serialization.py:22–30  ·  view source on GitHub ↗
(self, mask_modules)

Source from the content-addressed store, hash-verified

20
21 @pytest.mark.masked_modules('cPickle')
22 def test_no_cpickle(self, mask_modules):
23 prev = sys.modules.pop('celery.utils.serialization', None)
24 try:
25 import pickle as orig_pickle
26
27 from celery.utils.serialization import pickle
28 assert pickle.dumps is orig_pickle.dumps
29 finally:
30 sys.modules['celery.utils.serialization'] = prev
31
32
33class test_ensure_serializable:

Callers

nothing calls this directly

Calls 1

popMethod · 0.45

Tested by

no test coverage detected