MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_custom_op

Method test_custom_op

test/orm/dml/test_evaluator.py:337–349  ·  view source on GitHub ↗

test #3162

(self)

Source from the content-addressed store, hash-verified

335 compiler.process(User.name.op("^^")("bar"))
336
337 def test_custom_op(self):
338 """test #3162"""
339
340 User = self.classes.User
341
342 eval_eq(
343 User.name.op("^^", python_impl=lambda a, b: a + "_foo_" + b)("bar")
344 == "name_foo_bar",
345 testcases=[
346 (User(name="name"), True),
347 (User(name="notname"), False),
348 ],
349 )
350
351 @testing.combinations(
352 (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