MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_labels_no_collision_index

Method test_labels_no_collision_index

test/sql/test_update.py:439–457  ·  view source on GitHub ↗

test for [ticket:4911]

(self)

Source from the content-addressed store, hash-verified

437 )
438
439 def test_labels_no_collision_index(self):
440 """test for [ticket:4911]"""
441
442 t = Table(
443 "foo",
444 MetaData(),
445 Column("id", Integer, index=True),
446 Column("foo_id", Integer),
447 )
448
449 self.assert_compile(
450 t.update().where(t.c.id == 5),
451 "UPDATE foo SET id=:id, foo_id=:foo_id WHERE foo.id = :id_1",
452 )
453
454 self.assert_compile(
455 t.update().where(t.c.id == bindparam(key=t.c.id._label)),
456 "UPDATE foo SET id=:id, foo_id=:foo_id WHERE foo.id = :foo_id_1",
457 )
458
459 def test_inline_defaults(self):
460 m = MetaData()

Callers

nothing calls this directly

Calls 7

TableClass · 0.90
MetaDataClass · 0.90
ColumnClass · 0.90
bindparamFunction · 0.90
assert_compileMethod · 0.80
whereMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected