MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_not_an_executable

Method test_not_an_executable

test/engine/test_execute.py:152–173  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

150 testing.db.dialect.has_table(testing.db, "some_table")
151
152 def test_not_an_executable(self):
153 for obj in (
154 Table("foo", MetaData(), Column("x", Integer)),
155 Column("x", Integer),
156 tsa.and_(True),
157 tsa.and_(True).compile(),
158 column("foo"),
159 column("foo").compile(),
160 select(1).cte(),
161 # select(1).subquery(),
162 MetaData(),
163 Integer(),
164 tsa.Index(name="foo"),
165 tsa.UniqueConstraint("x"),
166 ):
167 with testing.db.connect() as conn:
168 assert_raises_message(
169 tsa.exc.ObjectNotExecutableError,
170 "Not an executable object",
171 conn.execute,
172 obj,
173 )
174
175 def test_stmt_exception_bytestring_raised(self):
176 name = "méil"

Callers

nothing calls this directly

Calls 11

TableClass · 0.90
MetaDataClass · 0.90
ColumnClass · 0.90
columnFunction · 0.90
selectFunction · 0.90
IntegerClass · 0.90
assert_raises_messageFunction · 0.90
and_Method · 0.45
compileMethod · 0.45
cteMethod · 0.45
connectMethod · 0.45

Tested by

no test coverage detected