MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_python_impl_not_present

Method test_python_impl_not_present

test/sql/test_operators.py:4656–4667  ·  test/sql/test_operators.py::CustomOpTest.test_python_impl_not_present

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 class="st">""class="st">"test class="cm">#3162"class="st">""
4658 c = column(class="st">"x")
4659 c2 = column(class="st">"y")
4660 op1 = c.op(class="st">"$")(c2).operator
4661
4662 with expect_raises_message(
4663 exc.InvalidRequestError,
4664 rclass="st">"Custom operator &class="cm">#x27;\$' can't be used with plain Python objects "
4665 class="st">"unless it includes the &class="cm">#x27;python_impl' parameter.",
4666 ):
4667 op1(3, 5)
4668
4669 def test_operator_class_default(self):
4670 class="st">""class="st">"Test that custom_op defaults to OperatorClass.BASE"class="st">""

Callers

nothing calls this directly

Calls 3

columnFunction · 0.90
expect_raises_messageFunction · 0.90
opMethod · 0.45

Tested by

no test coverage detected