MCPcopy Index your code
hub / github.com/sqlalchemy/sqlalchemy / test_from_static_col_value

Method test_from_static_col_value

test/sql/test_insert.py:1228–1241  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1226 )
1227
1228 def test_from_static_col_value(self):
1229 mytable = self.tables.mytable
1230
1231 # from_dml_column() refers to a column not in SET, then it
1232 # raises for INSERT
1233 stmt = mytable.insert().values(
1234 description=from_dml_column(mytable.c.name)
1235 )
1236
1237 with expect_raises_message(
1238 exc.CompileError,
1239 "Can't resolve referenced column name in INSERT statement: 'name'",
1240 ):
1241 stmt.compile()
1242
1243 def test_from_sql_default(self):
1244 """test combinations with a column that has a SQL default"""

Callers

nothing calls this directly

Calls 5

from_dml_columnFunction · 0.90
expect_raises_messageFunction · 0.90
valuesMethod · 0.45
insertMethod · 0.45
compileMethod · 0.45

Tested by

no test coverage detected