MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_union_label

Method test_union_label

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

Source from the content-addressed store, hash-verified

1074 )
1075
1076 def test_union_label(self):
1077 s1 = select(func.foo("hoho").label("x"))
1078 s2 = select(func.foo("Bar").label("y"))
1079 stmt = union(s1, s2).order_by("x")
1080 self.assert_compile(
1081 stmt,
1082 "SELECT foo(:foo_1) AS x UNION SELECT foo(:foo_2) AS y ORDER BY x",
1083 )
1084
1085 def test_standalone_units_stringable(self):
1086 self.assert_compile(desc("somelabel"), "somelabel DESC")

Callers

nothing calls this directly

Calls 6

selectFunction · 0.90
unionFunction · 0.90
assert_compileMethod · 0.80
labelMethod · 0.45
fooMethod · 0.45
order_byMethod · 0.45

Tested by

no test coverage detected