MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_labels_no_collision

Method test_labels_no_collision

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

Source from the content-addressed store, hash-verified

424 )
425
426 def test_labels_no_collision(self):
427 t = table("foo", column("id"), column("foo_id"))
428
429 self.assert_compile(
430 t.update().where(t.c.id == 5),
431 "UPDATE foo SET id=:id, foo_id=:foo_id WHERE foo.id = :id_1",
432 )
433
434 self.assert_compile(
435 t.update().where(t.c.id == bindparam(key=t.c.id._label)),
436 "UPDATE foo SET id=:id, foo_id=:foo_id WHERE foo.id = :foo_id_1",
437 )
438
439 def test_labels_no_collision_index(self):
440 """test for [ticket:4911]"""

Callers

nothing calls this directly

Calls 6

tableFunction · 0.90
columnFunction · 0.90
bindparamFunction · 0.90
assert_compileMethod · 0.80
whereMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected