MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_picklability

Method test_picklability

test/ext/test_orderinglist.py:469–480  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

467 self.assert_(alpha[li].position == pos)
468
469 def test_picklability(self):
470 from sqlalchemy.ext.orderinglist import OrderingList
471
472 olist = OrderingList("order", reorder_on_append=True)
473 olist.append(DummyItem())
474
475 for loads, dumps in picklers():
476 pck = dumps(olist)
477 copy = loads(pck)
478
479 self.assert_(copy == olist)
480 self.assert_(copy.__dict__ == olist.__dict__)
481
482
483class DummyItem:

Callers

nothing calls this directly

Calls 7

appendMethod · 0.95
OrderingListClass · 0.90
picklersFunction · 0.90
DummyItemClass · 0.85
dumpsFunction · 0.85
loadsFunction · 0.85
assert_Method · 0.45

Tested by

no test coverage detected