MCPcopy Index your code
hub / github.com/sqlalchemy/sqlalchemy / test_python_impl_not_present

Method test_python_impl_not_present

test/sql/test_operators.py:4656–4667  ·  view source on GitHub ↗

test #3162

(self)

Source from the content-addressed store, hash-verified

4654 is_(op1(5, 3), True)
4655
4656 def test_python_impl_not_present(self):
4657 """test #3162"""
4658 c = column("x")
4659 c2 = column("y")
4660 op1 = c.op("$")(c2).operator
4661
4662 with expect_raises_message(
4663 exc.InvalidRequestError,
4664 r"Custom operator '\$' can't be used with plain Python objects "
4665 "unless it includes the 'python_impl' parameter.",
4666 ):
4667 op1(3, 5)
4668
4669 def test_operator_class_default(self):
4670 """Test that custom_op defaults to OperatorClass.BASE"""

Callers

nothing calls this directly

Calls 3

columnFunction · 0.90
expect_raises_messageFunction · 0.90
opMethod · 0.45

Tested by

no test coverage detected