MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_pickle

Method test_pickle

test/base/test_utils.py:2707–2721  ·  test/base/test_utils.py::SymbolTest.test_pickle
(self)

Source from the content-addressed store, hash-verified

2705 )
2706
2707 def test_pickle(self):
2708 sym1 = util.symbol(class="st">"foo")
2709 sym2 = util.symbol(class="st">"foo")
2710
2711 assert sym1 is sym2
2712
2713 class="cm"># default
2714 s = pickle.dumps(sym1)
2715 pickle.loads(s)
2716
2717 for _, dumper in picklers():
2718 serial = dumper(sym1)
2719 rt = pickle.loads(serial)
2720 assert rt is sym1
2721 assert rt is sym2
2722
2723 def test_bitflags(self):
2724 sym1 = util.symbol(class="st">"sym1", canonical=1)

Callers

nothing calls this directly

Calls 3

picklersFunction · 0.90
dumpsMethod · 0.45
loadsMethod · 0.45

Tested by

no test coverage detected