MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_prefix_with

Method test_prefix_with

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

Source from the content-addressed store, hash-verified

371 )
372
373 def test_prefix_with(self):
374 table1 = self.tables.mytable
375
376 stmt = (
377 table1.insert()
378 .prefix_with("A", "B", dialect="mysql")
379 .prefix_with("C", "D")
380 )
381
382 self.assert_compile(
383 stmt,
384 "INSERT C D INTO mytable (myid, name, description) "
385 "VALUES (:myid, :name, :description)",
386 )
387
388 self.assert_compile(
389 stmt,
390 "INSERT A B C D INTO mytable (myid, name, description) "
391 "VALUES (%s, %s, %s)",
392 dialect=mysql.dialect(),
393 )
394
395 def test_inline_default(self):
396 metadata = MetaData()

Callers

nothing calls this directly

Calls 4

prefix_withMethod · 0.80
assert_compileMethod · 0.80
insertMethod · 0.45
dialectMethod · 0.45

Tested by

no test coverage detected