MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _assert_option

Method _assert_option

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

Source from the content-addressed store, hash-verified

1092 )
1093
1094 def _assert_option(self, entity_list, option):
1095 Item = self.classes.Item
1096
1097 context = (
1098 fixture_session()
1099 .query(*entity_list)
1100 .options(joinedload(option))
1101 ._compile_state()
1102 )
1103 key = ("loader", (inspect(Item), inspect(Item).attrs.keywords))
1104 assert key in context.attributes
1105
1106 def _assert_loader_strategy_exception(self, entity_list, options, message):
1107 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