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

Method test_labels_no_collision

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

Source from the content-addressed store, hash-verified

422 )
423
424 def test_labels_no_collision(self):
425 t = table("foo", column("id"), column("foo_id"))
426
427 self.assert_compile(
428 t.update().where(t.c.id == 5),
429 "UPDATE foo SET id=:id, foo_id=:foo_id WHERE foo.id = :id_1",
430 )
431
432 self.assert_compile(
433 t.update().where(t.c.id == bindparam(key=t.c.id._label)),
434 "UPDATE foo SET id=:id, foo_id=:foo_id WHERE foo.id = :foo_id_1",
435 )
436
437 def test_labels_no_collision_index(self):
438 """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