(self)
| 207 | ) |
| 208 | |
| 209 | def test_table_valued_advice(self): |
| 210 | msg = ( |
| 211 | r"SQL expression element expected, got %s. To create a " |
| 212 | r"column expression from a FROM clause row as a whole, " |
| 213 | r"use the .table_valued\(\) method." |
| 214 | ) |
| 215 | assert_raises_message( |
| 216 | exc.ArgumentError, |
| 217 | msg % ("Table.*",), |
| 218 | expect, |
| 219 | roles.ExpressionElementRole, |
| 220 | t, |
| 221 | ) |
| 222 | |
| 223 | # no table_valued() message here right now, it goes to scalar subquery |
| 224 | with testing.expect_warnings( |
| 225 | "implicitly coercing SELECT object to scalar subquery" |
| 226 | ): |
| 227 | expect(roles.ExpressionElementRole, t.select().alias()) |
| 228 | |
| 229 | def test_raise_on_regular_python_obj_for_expr(self): |
| 230 | """test #6350""" |
nothing calls this directly
no test coverage detected