MCPcopy Index your code
hub / github.com/sqlalchemy/sqlalchemy / test_loader_criteria

Method test_loader_criteria

test/orm/test_cache_key.py:163–179  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

161 )
162
163 def test_loader_criteria(self):
164 User, Address = self.classes("User", "Address")
165
166 class Foo:
167 id = Column(Integer)
168 name = Column(String)
169
170 self._run_cache_key_fixture(
171 lambda: (
172 with_loader_criteria(User, User.name != "somename"),
173 with_loader_criteria(User, User.id != 5),
174 with_loader_criteria(User, lambda cls: cls.id == 10),
175 with_loader_criteria(Address, Address.id != 5),
176 with_loader_criteria(Foo, lambda cls: cls.id == 10),
177 ),
178 compare_values=True,
179 )
180
181 def test_loader_criteria_bound_param_thing(self):
182 class Foo:

Callers

nothing calls this directly

Calls 2

with_loader_criteriaFunction · 0.90

Tested by

no test coverage detected