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

Method test_eagerload_config_disable

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

Source from the content-addressed store, hash-verified

5555 argnames="lazy",
5556 )
5557 def test_eagerload_config_disable(self, lazy):
5558 self._eagerload_mappings(addresses_lazy=lazy)
5559
5560 User = self.classes.User
5561 sess = fixture_session()
5562 q = sess.query(User).enable_eagerloads(False).yield_per(1)
5563 objs = q.all()
5564 eq_(len(objs), 4)
5565 for obj in objs:
5566 assert "addresses" not in obj.__dict__
5567
5568 def test_m2o_joinedload_not_others(self):
5569 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