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

Method test_no_subqueryload_opt

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

Source from the content-addressed store, hash-verified

5493 )
5494
5495 def test_no_subqueryload_opt(self):
5496 self._eagerload_mappings()
5497
5498 User = self.classes.User
5499 sess = fixture_session()
5500 q = sess.query(User).options(subqueryload(User.addresses)).yield_per(1)
5501 assert_raises_message(
5502 sa_exc.InvalidRequestError,
5503 "Can't use yield_per with eager loaders that require "
5504 "uniquing or row buffering",
5505 q.all,
5506 )
5507
5508 def test_no_subqueryload_mapping(self):
5509 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