MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_add_in_classes

Method test_add_in_classes

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

Source from the content-addressed store, hash-verified

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):
1012 operator_classes = (
1013 Integer.operator_classes | OperatorClass.STRING_MATCH
1014 )
1015
1016 expr = column("q", MyType).like("hi")
1017
1018 self.assert_compile(expr, "q LIKE :q_1", checkparams={"q_1": "hi"})
1019
1020
1021class ExtensionOperatorTest(fixtures.TestBase, testing.AssertsCompiledSQL):

Callers

nothing calls this directly

Calls 3

columnFunction · 0.90
assert_compileMethod · 0.80
likeMethod · 0.45

Tested by

no test coverage detected