MCPcopy
hub / github.com/django/django / _confirm_picklable

Method _confirm_picklable

django/test/runner.py:201–207  ·  view source on GitHub ↗

Confirm that obj can be pickled and unpickled as multiprocessing will need to pickle the exception in the child process and unpickle it in the parent process. Let the exception rise, if not.

(self, obj)

Source from the content-addressed store, hash-verified

199 return self.testsRun - 1
200
201 def _confirm_picklable(self, obj):
202 """
203 Confirm that obj can be pickled and unpickled as multiprocessing will
204 need to pickle the exception in the child process and unpickle it in
205 the parent process. Let the exception rise, if not.
206 """
207 pickle.loads(pickle.dumps(obj))
208
209 def _print_unpicklable_subtest(self, test, subtest, pickle_exc):
210 print("""

Callers 3

check_picklableMethod · 0.95

Calls 2

loadsMethod · 0.45
dumpsMethod · 0.45

Tested by 1