MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_invalid_op_custom

Method test_invalid_op_custom

test/sql/test_operators.py:998–1008  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

996 self.assert_compile(expr, "q LIKE :q_1", checkparams={"q_1": "hi"})
997
998 def test_invalid_op_custom(self):
999 class MyType(Integer):
1000 pass
1001
1002 with expect_deprecated(
1003 r"Type object .*.MyType.* does not include "
1004 "operator 'like_op' in its operator classes."
1005 ):
1006 expr = column("q", MyType).like("hi")
1007
1008 self.assert_compile(expr, "q LIKE :q_1", checkparams={"q_1": "hi"})
1009
1010 def test_add_in_classes(self):
1011 class MyType(Integer):

Callers

nothing calls this directly

Calls 4

expect_deprecatedFunction · 0.90
columnFunction · 0.90
assert_compileMethod · 0.80
likeMethod · 0.45

Tested by

no test coverage detected