MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _add_override_factory

Method _add_override_factory

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

Source from the content-addressed store, hash-verified

931
932class NewOperatorTest(_CustomComparatorTests, fixtures.TestBase):
933 def _add_override_factory(self):
934 class MyInteger(Integer):
935 class comparator_factory(TypeEngine.Comparator):
936 def __init__(self, expr):
937 super().__init__(expr)
938
939 def foob(self, other):
940 return self.expr.op("foob")(other)
941
942 return MyInteger
943
944 def _assert_add_override(self, expr):
945 assert (expr.foob(5)).compare(expr.op("foob")(5))

Callers 7

test_override_builtinMethod · 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