MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_unbound_sub_options

Method test_unbound_sub_options

test/orm/test_cache_key.py:248–271  ·  view source on GitHub ↗

test #6869

(self)

Source from the content-addressed store, hash-verified

246 )
247
248 def test_unbound_sub_options(self):
249 """test #6869"""
250
251 User, Address, Keyword, Order, Item = self.classes(
252 "User", "Address", "Keyword", "Order", "Item"
253 )
254 Dingaling = self.classes.Dingaling
255
256 self._run_cache_key_fixture(
257 lambda: (
258 joinedload(User.addresses).options(
259 joinedload(Address.dingaling)
260 ),
261 joinedload(User.addresses).options(
262 joinedload(Address.dingaling).options(
263 load_only(Dingaling.id)
264 )
265 ),
266 joinedload(User.orders).options(
267 joinedload(Order.items).options(joinedload(Item.keywords))
268 ),
269 ),
270 compare_values=True,
271 )
272
273 def test_bound_options(self):
274 User, Address, Keyword, Order, Item = self.classes(

Callers

nothing calls this directly

Calls 4

joinedloadFunction · 0.90
load_onlyFunction · 0.90
optionsMethod · 0.45

Tested by

no test coverage detected