test for [ticket:4911]
(self)
| 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() |