(self)
| 7740 | ) |
| 7741 | |
| 7742 | def test_label_conflict_union(self): |
| 7743 | t1 = Table( |
| 7744 | "t1", MetaData(), Column("a", Integer), Column("b", Integer) |
| 7745 | ) |
| 7746 | t2 = Table("t2", MetaData(), Column("t1_a", Integer)) |
| 7747 | union = select(t2).union(select(t2)).alias() |
| 7748 | |
| 7749 | t1_alias = t1.alias() |
| 7750 | stmt = ( |
| 7751 | select(t1, t1_alias) |
| 7752 | .select_from(t1.join(union, t1.c.a == union.c.t1_a)) |
| 7753 | .set_label_style(LABEL_STYLE_TABLENAME_PLUS_COL) |
| 7754 | ) |
| 7755 | comp = stmt.compile() |
| 7756 | eq_( |
| 7757 | set(comp._create_result_map()), |
| 7758 | {"t1_1_b", "t1_1_a", "t1_a", "t1_b"}, |
| 7759 | ) |
| 7760 | is_(comp._create_result_map()["t1_a"][1][2], t1.c.a) |
| 7761 | |
| 7762 | def test_insert_with_select_values(self): |
| 7763 | astring = Column("a", String) |
nothing calls this directly
no test coverage detected