MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / test_not_an_executable

Method test_not_an_executable

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

Source from the content-addressed store, hash-verified

146 testing.db.dialect.has_table(testing.db, "some_table")
147
148 def test_not_an_executable(self):
149 for obj in (
150 Table("foo", MetaData(), Column("x", Integer)),
151 Column("x", Integer),
152 tsa.and_(True),
153 tsa.and_(True).compile(),
154 column("foo"),
155 column("foo").compile(),
156 select(1).cte(),
157 # select(1).subquery(),
158 MetaData(),
159 Integer(),
160 tsa.Index(name="foo"),
161 tsa.UniqueConstraint("x"),
162 ):
163 with testing.db.connect() as conn:
164 assert_raises_message(
165 tsa.exc.ObjectNotExecutableError,
166 "Not an executable object",
167 conn.execute,
168 obj,
169 )
170
171 def test_stmt_exception_bytestring_raised(self):
172 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