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

Method test_custom_op

test/orm/dml/test_evaluator.py:333–345  ·  view source on GitHub ↗

test #3162

(self)

Source from the content-addressed store, hash-verified

331 compiler.process(User.name.op("^^")("bar"))
332
333 def test_custom_op(self):
334 """test #3162"""
335
336 User = self.classes.User
337
338 eval_eq(
339 User.name.op("^^", python_impl=lambda a, b: a + "_foo_" + b)("bar")
340 == "name_foo_bar",
341 testcases=[
342 (User(name="name"), True),
343 (User(name="notname"), False),
344 ],
345 )
346
347 @testing.combinations(
348 (lambda User: User.id + 5, "id", 10, 15, None),

Callers

nothing calls this directly

Calls 3

eval_eqFunction · 0.85
UserClass · 0.70
opMethod · 0.45

Tested by

no test coverage detected