MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_select_alias_label_alt_name

Method test_select_alias_label_alt_name

test/sql/test_text.py:655–662  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

653 assert t.c.x not in mapping
654
655 def test_select_alias_label_alt_name(self):
656 t = self._xy_table_fixture()
657 l1, l2 = t.c.x.label("a"), t.c.y.label("b")
658 s = text("select x AS a, y AS b FROM t").columns(l1, l2).alias()
659 mapping = self._mapping(s)
660 assert l1 in mapping
661
662 assert t.c.x not in mapping
663
664 def test_select_column(self):
665 t = self._xy_table_fixture()

Callers

nothing calls this directly

Calls 6

_xy_table_fixtureMethod · 0.95
_mappingMethod · 0.95
textFunction · 0.90
labelMethod · 0.45
aliasMethod · 0.45
columnsMethod · 0.45

Tested by

no test coverage detected