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

Method test_from_static_col_value

test/sql/test_update.py:1053–1073  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1051 )
1052
1053 def test_from_static_col_value(self):
1054 mytable = self.tables.mytable
1055
1056 # from_dml_column() refers to a column not in SET, then the
1057 # column is rendered
1058 stmt = mytable.update().values(
1059 description=from_dml_column(mytable.c.name)
1060 )
1061
1062 self.assert_compile(
1063 stmt,
1064 "UPDATE mytable SET description=mytable.name",
1065 checkparams={},
1066 )
1067
1068 self.assert_compile(
1069 stmt,
1070 "UPDATE mytable SET description=mytable.name",
1071 checkpositional=(),
1072 dialect="sqlite",
1073 )
1074
1075 def test_from_sql_onupdate(self):
1076 """test combinations with a column that has a SQL onupdate"""

Callers

nothing calls this directly

Calls 4

from_dml_columnFunction · 0.90
assert_compileMethod · 0.80
valuesMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected