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

Method _add_override_factory

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

Source from the content-addressed store, hash-verified

914
915class NewOperatorTest(_CustomComparatorTests, fixtures.TestBase):
916 def _add_override_factory(self):
917 class MyInteger(Integer):
918 class comparator_factory(TypeEngine.Comparator):
919 def __init__(self, expr):
920 super().__init__(expr)
921
922 def foob(self, other):
923 return self.expr.op("foob")(other)
924
925 return MyInteger
926
927 def _assert_add_override(self, expr):
928 assert (expr.foob(5)).compare(expr.op("foob")(5))

Callers 8

test_override_builtinMethod · 0.45
test_column_proxyMethod · 0.45
test_subquery_proxyMethod · 0.45
test_alias_proxyMethod · 0.45
test_binary_propagateMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected