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

Method _assert_option

test/orm/test_options.py:1104–1114  ·  view source on GitHub ↗
(self, entity_list, option)

Source from the content-addressed store, hash-verified

1102 )
1103
1104 def _assert_option(self, entity_list, option):
1105 Item = self.classes.Item
1106
1107 context = (
1108 fixture_session()
1109 .query(*entity_list)
1110 .options(joinedload(option))
1111 ._compile_state()
1112 )
1113 key = ("loader", (inspect(Item), inspect(Item).attrs.keywords))
1114 assert key in context.attributes
1115
1116 def _assert_loader_strategy_exception(self, entity_list, options, message):
1117 sess = fixture_session()

Calls 6

fixture_sessionFunction · 0.90
joinedloadFunction · 0.90
inspectFunction · 0.90
_compile_stateMethod · 0.80
optionsMethod · 0.45
queryMethod · 0.45

Tested by

no test coverage detected