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

Method go

test/orm/test_default_strategies.py:24–38  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22 def _assert_fully_loaded(self, users):
23 # verify everything loaded, with no additional sql needed
24 def go():
25 # comparison with no additional sql
26 eq_(users, self.static.user_all_result)
27 # keywords are not part of self.static.user_all_result, so
28 # verify all the item keywords were loaded, with no more sql.
29 # 'any' verifies at least some items have keywords; we build
30 # a list for any([...]) instead of any(...) to prove we've
31 # iterated all the items with no sql.
32 f = util.flatten_iterator
33 assert any(
34 [
35 i.keywords
36 for i in f([o.items for o in f([u.orders for u in users])])
37 ]
38 )
39
40 self.assert_sql_count(testing.db, go, 0)
41

Callers

nothing calls this directly

Calls 15

eq_Function · 0.90
subqueryloadFunction · 0.90
joinedloadFunction · 0.90
defaultloadFunction · 0.90
enable_eagerloadsMethod · 0.80
noloadMethod · 0.80
joinedloadMethod · 0.80
defaultloadMethod · 0.80
subqueryloadMethod · 0.80
fFunction · 0.50
allMethod · 0.45
order_byMethod · 0.45

Tested by

no test coverage detected