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

Method test_unsupported_operator

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

Source from the content-addressed store, hash-verified

5936 schema.CreateTable(t).compile(dialect=sqlite.dialect())
5937
5938 def test_unsupported_operator(self):
5939 from sqlalchemy.sql.expression import BinaryExpression
5940
5941 def myop(x, y):
5942 pass
5943
5944 binary = BinaryExpression(column("foo"), column("bar"), myop)
5945 assert_raises_message(
5946 exc.UnsupportedCompilationError,
5947 r"Compiler <sqlalchemy.sql.compiler.StrSQLCompiler .*"
5948 r"can't render element of type <function.*",
5949 binary.compile,
5950 )
5951
5952
5953class 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