MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_load

Method test_load

test/orm/test_pickled.py:692–702  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

690 eq_(v2.__getstate__()["_of_type"], serialized_of_type)
691
692 def test_load(self):
693 s = fixture_session()
694
695 with_poly = with_polymorphic(Person, [Engineer, Manager], flat=True)
696 emp = (
697 s.query(Company)
698 .options(subqueryload(Company.employees.of_type(with_poly)))
699 .first()
700 )
701
702 pickle.loads(pickle.dumps(emp))
703
704
705class PolymorphicDeferredTest(fixtures.MappedTest):

Callers

nothing calls this directly

Calls 9

fixture_sessionFunction · 0.90
with_polymorphicFunction · 0.90
subqueryloadFunction · 0.90
firstMethod · 0.45
optionsMethod · 0.45
queryMethod · 0.45
of_typeMethod · 0.45
loadsMethod · 0.45
dumpsMethod · 0.45

Tested by

no test coverage detected