MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_eagerload_config_disable

Method test_eagerload_config_disable

test/orm/test_query.py:5629–5638  ·  view source on GitHub ↗
(self, lazy)

Source from the content-addressed store, hash-verified

5627 argnames="lazy",
5628 )
5629 def test_eagerload_config_disable(self, lazy):
5630 self._eagerload_mappings(addresses_lazy=lazy)
5631
5632 User = self.classes.User
5633 sess = fixture_session()
5634 q = sess.query(User).enable_eagerloads(False).yield_per(1)
5635 objs = q.all()
5636 eq_(len(objs), 4)
5637 for obj in objs:
5638 assert "addresses" not in obj.__dict__
5639
5640 def test_m2o_joinedload_not_others(self):
5641 self._eagerload_mappings(addresses_lazy="joined")

Callers

nothing calls this directly

Calls 7

_eagerload_mappingsMethod · 0.95
fixture_sessionFunction · 0.90
eq_Function · 0.90
enable_eagerloadsMethod · 0.80
yield_perMethod · 0.45
queryMethod · 0.45
allMethod · 0.45

Tested by

no test coverage detected