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

Method test_array_expression

test/sql/test_operators.py:4914–4930  ·  view source on GitHub ↗
(self, t_fixture, any_all_operators)

Source from the content-addressed store, hash-verified

4912 )
4913
4914 def test_array_expression(self, t_fixture, any_all_operators):
4915 t = t_fixture
4916 op, fn = any_all_operators
4917
4918 self.assert_compile(
4919 5 == fn(t.c.arrval[5:6] + postgresql.array([3, 4])),
4920 f"%(param_1)s = {op} (tab1.arrval[%(arrval_1)s:%(arrval_2)s] || "
4921 "ARRAY[%(param_2)s, %(param_3)s])",
4922 checkparams={
4923 "arrval_2": 6,
4924 "param_1": 5,
4925 "param_3": 4,
4926 "arrval_1": 5,
4927 "param_2": 3,
4928 },
4929 dialect="postgresql",
4930 )
4931
4932 def test_subq(self, t_fixture, any_all_operators):
4933 t = t_fixture

Callers

nothing calls this directly

Calls 2

assert_compileMethod · 0.80
arrayMethod · 0.80

Tested by

no test coverage detected