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

Method test_bound_options

test/orm/test_pickled.py:513–524  ·  view source on GitHub ↗
(self, test_case)

Source from the content-addressed store, hash-verified

511 .joinedload(Address.dingaling),
512 )
513 def test_bound_options(self, test_case):
514 sess, User, Address, Dingaling = self._option_test_fixture()
515
516 opt = testing.resolve_lambda(test_case, User=User, Address=Address)
517
518 opt2 = pickle.loads(pickle.dumps(opt))
519 eq_(opt.path, opt2.path)
520 for v1, v2 in zip(opt.context, opt2.context):
521 eq_(v1.local_opts, v2.local_opts)
522
523 u1 = sess.query(User).options(opt).first()
524 pickle.loads(pickle.dumps(u1))
525
526 def test_collection_setstate(self):
527 """test a particular cycle that requires CollectionAdapter

Callers

nothing calls this directly

Calls 7

_option_test_fixtureMethod · 0.95
eq_Function · 0.90
loadsMethod · 0.45
dumpsMethod · 0.45
firstMethod · 0.45
optionsMethod · 0.45
queryMethod · 0.45

Tested by

no test coverage detected