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

Method test_no_joinedload_opt

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

Source from the content-addressed store, hash-verified

5462 eq_(len(result.all()), 4)
5463
5464 def test_no_joinedload_opt(self):
5465 self._eagerload_mappings()
5466
5467 User = self.classes.User
5468 sess = fixture_session()
5469 q = sess.query(User).options(joinedload(User.addresses)).yield_per(1)
5470 assert_raises_message(
5471 sa_exc.InvalidRequestError,
5472 "Can't use yield_per with eager loaders that require "
5473 "uniquing or row buffering",
5474 q.all,
5475 )
5476
5477 def test_no_contains_eager_opt(self):
5478 self._eagerload_mappings()

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected