MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_multiple_literals

Method test_multiple_literals

test/sql/test_tstrings_py314.py:122–134  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

120 self.assert_compile(stmt, "1 = 1 AND 2 = 2")
121
122 def test_multiple_literals(self):
123 a, b, c, d = 1, 2, 3, 4
124 stmt = tstring(t"SELECT {a}, {b}, {c}, {d}")
125 self.assert_compile(
126 stmt,
127 "SELECT :param_1, :param_2, :param_3, :param_4",
128 checkparams={
129 "param_1": 1,
130 "param_2": 2,
131 "param_3": 3,
132 "param_4": 4,
133 },
134 )
135
136 def test_nested_tstring_execution(self):
137 inner = tstring(t"(SELECT {'some value'} AS anon_1)")

Callers

nothing calls this directly

Calls 2

tstringFunction · 0.90
assert_compileMethod · 0.80

Tested by

no test coverage detected