MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / test_pickle

Method test_pickle

test/base/test_utils.py:2612–2626  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2610 )
2611
2612 def test_pickle(self):
2613 sym1 = util.symbol("foo")
2614 sym2 = util.symbol("foo")
2615
2616 assert sym1 is sym2
2617
2618 # default
2619 s = pickle.dumps(sym1)
2620 pickle.loads(s)
2621
2622 for _, dumper in picklers():
2623 serial = dumper(sym1)
2624 rt = pickle.loads(serial)
2625 assert rt is sym1
2626 assert rt is sym2
2627
2628 def test_bitflags(self):
2629 sym1 = util.symbol("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