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

Method test_query_cols

test/aaa_profiling/test_orm.py:597–615  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

595 sess.close()
596
597 def test_query_cols(self):
598 Parent = self.classes.Parent
599 self._fixture()
600 sess = fixture_session()
601
602 # warm up cache
603 for attr in [Parent.data1, Parent.data2, Parent.data3, Parent.data4]:
604 attr.__clause_element__()
605
606 @profiling.function_call_count()
607 def go():
608 for i in range(10):
609 q = sess.query(
610 Parent.data1, Parent.data2, Parent.data3, Parent.data4
611 )
612
613 q.all()
614
615 go()
616
617
618class SelectInEagerLoadTest(NoCache, fixtures.MappedTest):

Callers

nothing calls this directly

Calls 4

_fixtureMethod · 0.95
fixture_sessionFunction · 0.90
goFunction · 0.70
__clause_element__Method · 0.45

Tested by

no test coverage detected