MCPcopy Create free account
hub / github.com/zzzeek/sqlalchemy / test_literal_interpretation_one

Method test_literal_interpretation_one

test/sql/test_case_statement.py:124–139  ·  view source on GitHub ↗

note this is modified as of #7287 to accept strings, tuples and other literal values as input where they are interpreted as bound values just like any other expression. Previously, an exception would be raised that the literal was ambiguous.

(self)

Source from the content-addressed store, hash-verified

122 )
123
124 def test_literal_interpretation_one(self):
125 """note this is modified as of #7287 to accept strings, tuples
126 and other literal values as input
127 where they are interpreted as bound values just like any other
128 expression.
129
130 Previously, an exception would be raised that the literal was
131 ambiguous.
132
133
134 """
135 self.assert_compile(
136 case(("x", "y")),
137 "CASE WHEN :param_1 THEN :param_2 END",
138 checkparams={"param_1": "x", "param_2": "y"},
139 )
140
141 def test_literal_interpretation_two(self):
142 """note this is modified as of #7287 to accept strings, tuples

Callers

nothing calls this directly

Calls 2

caseFunction · 0.90
assert_compileMethod · 0.80

Tested by

no test coverage detected