MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _assert_attrs

Method _assert_attrs

test/orm/test_options.py:1332–1343  ·  view source on GitHub ↗
(self, opts, expected)

Source from the content-addressed store, hash-verified

1330 )
1331
1332 def _assert_attrs(self, opts, expected):
1333 User = self.classes.User
1334
1335 s = fixture_session()
1336 q1 = s.query(User).options(*opts)
1337 attr = q1._compile_context().attributes
1338
1339 key = (
1340 "loader",
1341 tuple(inspect(User)._path_registry[User.name.property]),
1342 )
1343 eq_(attr[key].local_opts, expected)
1344
1345 def test_single_opt_only(self):
1346 User = self.classes.User

Calls 6

fixture_sessionFunction · 0.90
inspectFunction · 0.90
eq_Function · 0.90
_compile_contextMethod · 0.80
optionsMethod · 0.45
queryMethod · 0.45

Tested by

no test coverage detected