MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_no_subqueryload_opt

Method test_no_subqueryload_opt

test/orm/test_query.py:5567–5578  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

5565 )
5566
5567 def test_no_subqueryload_opt(self):
5568 self._eagerload_mappings()
5569
5570 User = self.classes.User
5571 sess = fixture_session()
5572 q = sess.query(User).options(subqueryload(User.addresses)).yield_per(1)
5573 assert_raises_message(
5574 sa_exc.InvalidRequestError,
5575 "Can't use yield_per with eager loaders that require "
5576 "uniquing or row buffering",
5577 q.all,
5578 )
5579
5580 def test_no_subqueryload_mapping(self):
5581 self._eagerload_mappings(addresses_lazy="subquery")

Callers

nothing calls this directly

Calls 7

_eagerload_mappingsMethod · 0.95
fixture_sessionFunction · 0.90
subqueryloadFunction · 0.90
assert_raises_messageFunction · 0.90
yield_perMethod · 0.45
optionsMethod · 0.45
queryMethod · 0.45

Tested by

no test coverage detected