MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_no_joinedload_opt

Method test_no_joinedload_opt

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

Source from the content-addressed store, hash-verified

5534 eq_(len(result.all()), 4)
5535
5536 def test_no_joinedload_opt(self):
5537 self._eagerload_mappings()
5538
5539 User = self.classes.User
5540 sess = fixture_session()
5541 q = sess.query(User).options(joinedload(User.addresses)).yield_per(1)
5542 assert_raises_message(
5543 sa_exc.InvalidRequestError,
5544 "Can't use yield_per with eager loaders that require "
5545 "uniquing or row buffering",
5546 q.all,
5547 )
5548
5549 def test_no_contains_eager_opt(self):
5550 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