MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_values_illegal

Method test_values_illegal

test/sql/test_operators.py:5209–5218  ·  test/sql/test_operators.py::AnyAllTest.test_values_illegal
(self, t_fixture, fn)

Source from the content-addressed store, hash-verified

5207
5208 @testing.combinations(any_, all_, argnames=class="st">"fn")
5209 def test_values_illegal(self, t_fixture, fn):
5210 t = t_fixture
5211
5212 with expect_raises_message(
5213 exc.ArgumentError,
5214 class="st">"SQL expression element expected, got .* "
5215 class="st">"To create a column expression from a VALUES clause, "
5216 rclass="st">"use the .scalar_values\(\) method.",
5217 ):
5218 fn(values(t.c.data).data([(1,), (42,)]))
5219
5220
5221class DeprecatedAnyAllTest(fixtures.TestBase, testing.AssertsCompiledSQL):

Callers

nothing calls this directly

Calls 3

expect_raises_messageFunction · 0.90
valuesFunction · 0.90
dataMethod · 0.45

Tested by

no test coverage detected