MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_unsupported_operator

Method test_unsupported_operator

test/sql/test_compiler.py:6143–6155  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

6141 schema.CreateTable(t).compile(dialect=sqlite.dialect())
6142
6143 def test_unsupported_operator(self):
6144 from sqlalchemy.sql.expression import BinaryExpression
6145
6146 def myop(x, y):
6147 pass
6148
6149 binary = BinaryExpression(column("foo"), column("bar"), myop)
6150 assert_raises_message(
6151 exc.UnsupportedCompilationError,
6152 r"Compiler <sqlalchemy.sql.compiler.StrSQLCompiler .*"
6153 r"can't render element of type <function.*",
6154 binary.compile,
6155 )
6156
6157
6158class StringifySpecialTest(fixtures.TestBase):

Callers

nothing calls this directly

Calls 3

columnFunction · 0.90
assert_raises_messageFunction · 0.90
BinaryExpressionClass · 0.85

Tested by

no test coverage detected