MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / picklers

Function picklers

lib/sqlalchemy/testing/util.py:58–62  ·  lib/sqlalchemy/testing/util.py::picklers
()

Source from the content-addressed store, hash-verified

56
57
58def picklers():
59 nt = namedtuple(class="st">"picklers", [class="st">"loads", class="st">"dumps"])
60
61 for protocol in range(-2, pickle.HIGHEST_PROTOCOL + 1):
62 yield nt(pickle.loads, lambda d: pickle.dumps(d, protocol))
63
64
65def random_choices(population, k=1):

Callers 15

test_pickle_quoteMethod · 0.90
test_pickle_typesMethod · 0.90
test_pickle_typesMethod · 0.90
test_pickleMethod · 0.90
test_serializeMethod · 0.90
test_pickleMethod · 0.90
test_pickleMethod · 0.90

Calls 1

dumpsMethod · 0.45

Tested by 15

test_pickle_quoteMethod · 0.72
test_pickle_typesMethod · 0.72
test_pickle_typesMethod · 0.72
test_pickleMethod · 0.72
test_serializeMethod · 0.72
test_pickleMethod · 0.72
test_pickleMethod · 0.72